

// x=[
//     {name:'',icon:'',test}
// ]

window.a_1_0_4_6_1_md5_val={};
window.a_1_0_4_6_1_解析多层数据结构_测试数据=[
    {
        name: '__style',
        ch_name: '样式',
        note: "样式",
        type: "dict2",
        dict:[
      {
        name: '__edit_flag__',
        ch_name: '辅助开关',
        note: "可视化编辑模式下的一些辅助线",
        type: "bool",
        default: false,
        },
        {
          name: '__margin',
          ch_name: '外距',
          note: "外距",
          
        default: 'null',
        type: "select_eval",
        select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]},
        {
        name: '__margin_x',
        ch_name: '外距-左右',
        note: "外距-左右",
       
        default: 'null',
        type: "select_eval",
        select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
        },
        {
            name: '__margin_y',
            ch_name: '外距-上下',
            note: "外距-上下",
            default: 'null',
            type: "select_eval",
            select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
        },
      {
        name: '__margin_left',
        ch_name: '左外距',
        note: "左外距",
       
        default: 'null',
        type: "select_eval",
        select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
        },
      {
        name: '__margin_right',
        ch_name: '右外距',
        note: "右外距",
       
        default: 'null',
        type: "select_eval",
        select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
        },
      {
        name: '__margin_top',
        ch_name: '上外距',
        note: "上外距",
       
        default: 'null',
        type: "select_eval",
        select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
        },
      {
        name: '__margin_bottom',
        ch_name: '下外距',
        note: "下外距",
       
        default: 'null',
        type: "select_eval",
        select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
        },
        {
        name: '__padding',
        ch_name: '内距',
        note: "内距",
       
        default: 'null',
        type: "select_eval",
        select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
        },
        {
            name: '__padding_x',
            ch_name: '内距-左右',
            note: "内距-左右",
           
        default: 'null',
        type: "select_eval",
        select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
        },
        {
        name: '__padding_y',
        ch_name: '内距-上下',
        note: "内距-上下",
       
        default: 'null',
        type: "select_eval",
        select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
        },
      {
        name: '__padding_left',
        ch_name: '左内距',
        note: "左内距",
       
        default: 'null',
        type: "select_eval",
        select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
        },
      {
        name: '__paddint_right',
        ch_name: '右内距',
        note: "右内距",
       
        default: 'null',
        type: "select_eval",
        select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
        },
      {
        name: '__padding_top',
        ch_name: '上内距',
        note: "上内距",
       
        default: 'null',
        type: "select_eval",
        select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
        },
      {
        name: '__padding_bottom',
        ch_name: '下内距',
        note: "下内距",
       
        default: 'null',
        type: "select_eval",
        select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
        },
        ]
      },
    {
        name: "size",
        ch_name: "尺寸",
        default: "medium",
        note: "尺寸",
        type: "select",
        
  select_list: ["x-small","small","medium","large","x-large"]
    },
    {
        name: "name1",
        ch_name: "标题",
        default: "后台管理系统",
        note: "顶部标题内容",
        type: "str",
    },
    {   name: "icon",
        ch_name: "图标",
        default: "icon iconfont icon-shezhi",
        note: "侧边栏展开按钮的类名",
        type: "class",
    }
    ,{
  name:'menu_data',
  note:'目录数据',
  ch_name:'目录数据',
  type:'dict',
  dict:[{
    name:"icon",
    default: '',
    note:'图标类',
    ch_name:'图标类',
    type:'class'
  },{
    name:"url",
    default: '',
    note:'路由',
    ch_name:'路由',
    type:'url'
  },{
    name:"name",
    default: '侧边栏',
    note:'侧边栏内容',
    ch_name:'侧边栏内容',
    type:'str'
  },{
    name:"test",
    note:'测试',
    ch_name:'测试',
    type:'dict',
    dict:[{
      name:"icon",
      default: '',
      note:'图标类',
      ch_name:'图标类',
      type:'class'
    }]
  },
]
}
]
window.a_1_0_4_6_1_解析多层数据结构=function(数据结构){
    console.log("开始解析多层数据结构:",数据结构)
let res={};//保存每层数据结构的类型和默认值
//path:'menu_data.name'  type:'str'  default: '' 
//path:'menu_data' type:'dict' default:{name:'',url:'',icon:'',test:{'icon:''}}
let lst=[];//待处理队列
for(let i=0;i<数据结构.length;i++){
    lst.push({path:'',data:数据结构[i]})
}
while(lst.length){
let item=lst.pop();
let path=item.path;
let data=item.data;
let father_default=item.father_default;
// if(path.split(".").length>1 && father_default){
//   if(data.type!='dict'){father_default[data.name]=data.default;}
//   else{
    
//     father_default[data.name]={};}
// }
// console.log("当前处理item:",item)
let new_path=(path.length?(path+'.'):'')+data.name;
// console.log("data",data)
res[new_path]=JSON.parse(JSON.stringify(data));
res[new_path]['key']=new_path;

if (data.type=='dict'){
  res[new_path]['default']={};
//   console.log("当前处理itemxx:",item)
//   console.log(`path.split(".").length>1 && father_default`,path.split(".").length>1 &&  (father_default!=null || father_default!=undefined))
  if(new_path.split(".").length>1 &&  father_default){father_default[data.name]=res[new_path]['default'];}
//   console.log(data)
  for(let i=0;i<data.dict.length;i++){
    lst.push({
      path:new_path,
      data:data.dict[i],
      father_default:res[new_path]['default']
    })
  }
}else if(data.type=='dict2'){
  res[new_path]['default']={};
  //   console.log("当前处理itemxx:",item)
  //   console.log(`path.split(".").length>1 && father_default`,path.split(".").length>1 &&  (father_default!=null || father_default!=undefined))
    if(new_path.split(".").length>1 &&  father_default){father_default[data.name]=res[new_path]['default'];}
  //   console.log(data)
    for(let i=0;i<data.dict.length;i++){
      lst.push({
        path:new_path,
        data:data.dict[i],
        father_default:res[new_path]['default']
      })
    }
}

else if (data.type!='dict'){
    res[new_path]['default']=data.default;
    if(new_path.split(".").length>1 && father_default){father_default[data.name]=data.default;}
  }



}
return res;
}
// window.a_1_0_4_6_1_解析多层数据结构(window.a_1_0_4_6_1_解析多层数据结构_测试数据);


window.a_1_0_4_6_1_数据_测试数据={
    name1: "后台管理系统",
    icon: "icon iconfont icon-shezhi",
    menu_data: [
        {name:'设备控制',icon:'',url:'',test:[{icon:''}]},
        {name:'用户中心',icon:'',url:'',test:[{icon:''}]},
        {name:'日志中心',icon:'',url:'',test:[{icon:''}]},
    ],
    __style:{
        __edit_flag__:true,
        __margin: 'null',
        __margin_x: 'null',
        __margin_y: 'null',
        __margin_right: 'null',
        __margin_left: 'null',
        __margin_top: 'null',
        __margin_bottom: 'null',
        __padding: 'null',
        __padding_x: 'null',
        __padding_y: 'null',
        __padding_left: 'null',
        __paddint_right: 'null',
        __padding_top: 'null',
        __padding_bottom: 'null',
    }

}
//变为

window.a_1_0_4_6_1_数据_res={
    "type": "dict",
    "dict": [
        {
            "name": "name1",
            "ch_name": "标题",
            "default": "后台管理系统",
            "note": "顶部标题内容",
            "type": "str",
            "key": "name1",
            "key2": "name1",
            "value": "后台管理系统"
        },
        {
            "name": "icon",
            "ch_name": "图标",
            "default": "icon iconfont icon-shezhi",
            "note": "侧边栏展开按钮的类名",
            "type": "class",
            "key": "icon",
            "key2": "icon",
            "value": "icon iconfont icon-shezhi"
        },
        {
            "name": "menu_data",
            "note": "目录数据",
            "ch_name": "目录数据",
            "type": "dict",
            "dict": [
                {
                    "close": true,
                    "type": "dict_item",
                    "dict": [
                        {
                            "name": "name",
                            "default": "侧边栏",
                            "note": "侧边栏内容",
                            "ch_name": "侧边栏内容",
                            "type": "str",
                            "key": "menu_data.0.name",
                            "key2": "menu_data.0.name",
                            "value": "设备控制"
                        },
                        {
                            "name": "icon",
                            "default": "",
                            "note": "图标类",
                            "ch_name": "图标类",
                            "type": "class",
                            "key": "menu_data.0.icon",
                            "key2": "menu_data.0.icon",
                            "value": ""
                        },
                        {
                            "name": "url",
                            "default": "",
                            "note": "路由",
                            "ch_name": "路由",
                            "type": "url",
                            "key": "menu_data.0.url",
                            "key2": "menu_data.0.url",
                            "value": ""
                        },
                        {
                            "name": "test",
                            "note": "测试",
                            "ch_name": "测试",
                            "type": "dict",
                            "dict": [
                                {
                                    "close": true,
                                    "type": "dict_item",
                                    "dict": [
                                        {
                                            "name": "icon",
                                            "default": "",
                                            "note": "图标类",
                                            "ch_name": "图标类",
                                            "type": "class",
                                            "key": "menu_data.0.test.0.icon",
                                            "key2": "menu_data.0.test.0.icon",
                                            "value": ""
                                        }
                                    ],
                                    "name": 0,
                                    "key": "menu_data.0.test.0",
                                    "f_data": {
                                        "name": "test",
                                        "note": "测试",
                                        "ch_name": "测试",
                                        "type": "dict",
                                        "dict": [],
                                        "key": "menu_data.0.test",
                                        "default": {
                                            "icon": ""
                                        },
                                        "key2": "menu_data.0.test",
                                        "value": "",
                                        "close": true
                                    }
                                }
                            ],
                            "key": "menu_data.0.test",
                            "default": {
                                "icon": ""
                            },
                            "key2": "menu_data.0.test",
                            "value": "",
                            "close": true
                        }
                    ],
                    "name": 0,
                    "key": "menu_data.0",
                    "f_data": {
                        "name": "menu_data",
                        "note": "目录数据",
                        "ch_name": "目录数据",
                        "type": "dict",
                        "dict": [],
                        "key": "menu_data",
                        "default": {
                            "test": {
                                "icon": ""
                            },
                            "name": "侧边栏",
                            "url": "",
                            "icon": ""
                        },
                        "key2": "menu_data",
                        "value": "",
                        "close": true
                    }
                },
                {
                    "close": true,
                    "type": "dict_item",
                    "dict": [
                        {
                            "name": "name",
                            "default": "侧边栏",
                            "note": "侧边栏内容",
                            "ch_name": "侧边栏内容",
                            "type": "str",
                            "key": "menu_data.1.name",
                            "key2": "menu_data.1.name",
                            "value": "用户中心"
                        },
                        {
                            "name": "icon",
                            "default": "",
                            "note": "图标类",
                            "ch_name": "图标类",
                            "type": "class",
                            "key": "menu_data.1.icon",
                            "key2": "menu_data.1.icon",
                            "value": ""
                        },
                        {
                            "name": "url",
                            "default": "",
                            "note": "路由",
                            "ch_name": "路由",
                            "type": "url",
                            "key": "menu_data.1.url",
                            "key2": "menu_data.1.url",
                            "value": ""
                        },
                        {
                            "name": "test",
                            "note": "测试",
                            "ch_name": "测试",
                            "type": "dict",
                            "dict": [
                                {
                                    "close": true,
                                    "type": "dict_item",
                                    "dict": [
                                        {
                                            "name": "icon",
                                            "default": "",
                                            "note": "图标类",
                                            "ch_name": "图标类",
                                            "type": "class",
                                            "key": "menu_data.1.test.0.icon",
                                            "key2": "menu_data.1.test.0.icon",
                                            "value": ""
                                        }
                                    ],
                                    "name": 0,
                                    "key": "menu_data.1.test.0",
                                    "f_data": {
                                        "name": "test",
                                        "note": "测试",
                                        "ch_name": "测试",
                                        "type": "dict",
                                        "dict": [],
                                        "key": "menu_data.1.test",
                                        "default": {
                                            "icon": ""
                                        },
                                        "key2": "menu_data.1.test",
                                        "value": "",
                                        "close": true
                                    }
                                }
                            ],
                            "key": "menu_data.1.test",
                            "default": {
                                "icon": ""
                            },
                            "key2": "menu_data.1.test",
                            "value": "",
                            "close": true
                        }
                    ],
                    "name": 1,
                    "key": "menu_data.1",
                    "f_data": {
                        "name": "menu_data",
                        "note": "目录数据",
                        "ch_name": "目录数据",
                        "type": "dict",
                        "dict": [
                            {
                                "close": true,
                                "type": "dict_item",
                                "dict": [],
                                "name": 0,
                                "key": "menu_data.0",
                                "f_data": {
                                    "name": "menu_data",
                                    "note": "目录数据",
                                    "ch_name": "目录数据",
                                    "type": "dict",
                                    "dict": [],
                                    "key": "menu_data",
                                    "default": {
                                        "test": {
                                            "icon": ""
                                        },
                                        "name": "侧边栏",
                                        "url": "",
                                        "icon": ""
                                    },
                                    "key2": "menu_data",
                                    "value": "",
                                    "close": true
                                }
                            }
                        ],
                        "key": "menu_data",
                        "default": {
                            "test": {
                                "icon": ""
                            },
                            "name": "侧边栏",
                            "url": "",
                            "icon": ""
                        },
                        "key2": "menu_data",
                        "value": "",
                        "close": true
                    }
                },
                {
                    "close": true,
                    "type": "dict_item",
                    "dict": [
                        {
                            "name": "name",
                            "default": "侧边栏",
                            "note": "侧边栏内容",
                            "ch_name": "侧边栏内容",
                            "type": "str",
                            "key": "menu_data.2.name",
                            "key2": "menu_data.2.name",
                            "value": "日志中心"
                        },
                        {
                            "name": "icon",
                            "default": "",
                            "note": "图标类",
                            "ch_name": "图标类",
                            "type": "class",
                            "key": "menu_data.2.icon",
                            "key2": "menu_data.2.icon",
                            "value": ""
                        },
                        {
                            "name": "url",
                            "default": "",
                            "note": "路由",
                            "ch_name": "路由",
                            "type": "url",
                            "key": "menu_data.2.url",
                            "key2": "menu_data.2.url",
                            "value": ""
                        },
                        {
                            "name": "test",
                            "note": "测试",
                            "ch_name": "测试",
                            "type": "dict",
                            "dict": [
                                {
                                    "close": true,
                                    "type": "dict_item",
                                    "dict": [
                                        {
                                            "name": "icon",
                                            "default": "",
                                            "note": "图标类",
                                            "ch_name": "图标类",
                                            "type": "class",
                                            "key": "menu_data.2.test.0.icon",
                                            "key2": "menu_data.2.test.0.icon",
                                            "value": ""
                                        }
                                    ],
                                    "name": 0,
                                    "key": "menu_data.2.test.0",
                                    "f_data": {
                                        "name": "test",
                                        "note": "测试",
                                        "ch_name": "测试",
                                        "type": "dict",
                                        "dict": [],
                                        "key": "menu_data.2.test",
                                        "default": {
                                            "icon": ""
                                        },
                                        "key2": "menu_data.2.test",
                                        "value": "",
                                        "close": true
                                    }
                                }
                            ],
                            "key": "menu_data.2.test",
                            "default": {
                                "icon": ""
                            },
                            "key2": "menu_data.2.test",
                            "value": "",
                            "close": true
                        }
                    ],
                    "name": 2,
                    "key": "menu_data.2",
                    "f_data": {
                        "name": "menu_data",
                        "note": "目录数据",
                        "ch_name": "目录数据",
                        "type": "dict",
                        "dict": [
                            {
                                "close": true,
                                "type": "dict_item",
                                "dict": [],
                                "name": 0,
                                "key": "menu_data.0",
                                "f_data": {
                                    "name": "menu_data",
                                    "note": "目录数据",
                                    "ch_name": "目录数据",
                                    "type": "dict",
                                    "dict": [],
                                    "key": "menu_data",
                                    "default": {
                                        "test": {
                                            "icon": ""
                                        },
                                        "name": "侧边栏",
                                        "url": "",
                                        "icon": ""
                                    },
                                    "key2": "menu_data",
                                    "value": "",
                                    "close": true
                                }
                            },
                            {
                                "close": true,
                                "type": "dict_item",
                                "dict": [],
                                "name": 1,
                                "key": "menu_data.1",
                                "f_data": {
                                    "name": "menu_data",
                                    "note": "目录数据",
                                    "ch_name": "目录数据",
                                    "type": "dict",
                                    "dict": [
                                        {
                                            "close": true,
                                            "type": "dict_item",
                                            "dict": [],
                                            "name": 0,
                                            "key": "menu_data.0",
                                            "f_data": {
                                                "name": "menu_data",
                                                "note": "目录数据",
                                                "ch_name": "目录数据",
                                                "type": "dict",
                                                "dict": [],
                                                "key": "menu_data",
                                                "default": {
                                                    "test": {
                                                        "icon": ""
                                                    },
                                                    "name": "侧边栏",
                                                    "url": "",
                                                    "icon": ""
                                                },
                                                "key2": "menu_data",
                                                "value": "",
                                                "close": true
                                            }
                                        }
                                    ],
                                    "key": "menu_data",
                                    "default": {
                                        "test": {
                                            "icon": ""
                                        },
                                        "name": "侧边栏",
                                        "url": "",
                                        "icon": ""
                                    },
                                    "key2": "menu_data",
                                    "value": "",
                                    "close": true
                                }
                            }
                        ],
                        "key": "menu_data",
                        "default": {
                            "test": {
                                "icon": ""
                            },
                            "name": "侧边栏",
                            "url": "",
                            "icon": ""
                        },
                        "key2": "menu_data",
                        "value": "",
                        "close": true
                    }
                }
            ],
            "key": "menu_data",
            "default": {
                "test": {
                    "icon": ""
                },
                "name": "侧边栏",
                "url": "",
                "icon": ""
            },
            "key2": "menu_data",
            "value": "",
            "close": true
        },
        {
            "name": "__style",
            "ch_name": "样式",
            "note": "样式",
            "type": "dict2",
            "dict": [
                {
                    "name": "__edit_flag__",
                    "ch_name": "辅助开关",
                    "note": "可视化编辑模式下的一些辅助线",
                    "type": "bool",
                    "default": false,
                    "key": "__style.__edit_flag__",
                    "key2": "__style.__edit_flag__",
                    "组件属性路径": "__edit_flag__",
                    "value": true
                },
                {
                    "name": "__margin",
                    "ch_name": "外距",
                    "note": "外距",
                    "type": "select",
                    "default": "741",
                    "select_list": [
                        [
                            "741",
                            "no"
                        ],
                        [
                            "0",
                            "0px"
                        ],
                        [
                            "1",
                            "4px"
                        ],
                        [
                            "2",
                            "8px"
                        ],
                        [
                            "3",
                            "12px"
                        ],
                        [
                            "4",
                            "16px"
                        ],
                        [
                            "5",
                            "20px"
                        ],
                        [
                            "6",
                            "24px"
                        ],
                        [
                            "7",
                            "28px"
                        ],
                        [
                            "8",
                            "32px"
                        ],
                        [
                            "9",
                            "36px"
                        ],
                        [
                            "10",
                            "40px"
                        ],
                        [
                            "11",
                            "44px"
                        ],
                        [
                            "12",
                            "48px"
                        ]
                    ],
                    "key": "__style.__margin",
                    "key2": "__style.__margin",
                    "组件属性路径": "__margin",
                    "value": "null"
                },
                {
                    "name": "__margin_x",
                    "ch_name": "外距-左右",
                    "note": "外距-左右",
                    "type": "select",
                    "default": "741",
                    "select_list": [
                        [
                            "741",
                            "no"
                        ],
                        [
                            "0",
                            "0px"
                        ],
                        [
                            "1",
                            "4px"
                        ],
                        [
                            "2",
                            "8px"
                        ],
                        [
                            "3",
                            "12px"
                        ],
                        [
                            "4",
                            "16px"
                        ],
                        [
                            "5",
                            "20px"
                        ],
                        [
                            "6",
                            "24px"
                        ],
                        [
                            "7",
                            "28px"
                        ],
                        [
                            "8",
                            "32px"
                        ],
                        [
                            "9",
                            "36px"
                        ],
                        [
                            "10",
                            "40px"
                        ],
                        [
                            "11",
                            "44px"
                        ],
                        [
                            "12",
                            "48px"
                        ]
                    ],
                    "key": "__style.__margin_x",
                    "key2": "__style.__margin_x",
                    "组件属性路径": "__margin_x",
                    "value": "null"
                },
                {
                    "name": "__margin_y",
                    "ch_name": "外距-上下",
                    "note": "外距-上下",
                    "type": "select",
                    "default": "741",
                    "select_list": [
                        [
                            "741",
                            "no"
                        ],
                        [
                            "0",
                            "0px"
                        ],
                        [
                            "1",
                            "4px"
                        ],
                        [
                            "2",
                            "8px"
                        ],
                        [
                            "3",
                            "12px"
                        ],
                        [
                            "4",
                            "16px"
                        ],
                        [
                            "5",
                            "20px"
                        ],
                        [
                            "6",
                            "24px"
                        ],
                        [
                            "7",
                            "28px"
                        ],
                        [
                            "8",
                            "32px"
                        ],
                        [
                            "9",
                            "36px"
                        ],
                        [
                            "10",
                            "40px"
                        ],
                        [
                            "11",
                            "44px"
                        ],
                        [
                            "12",
                            "48px"
                        ]
                    ],
                    "key": "__style.__margin_y",
                    "key2": "__style.__margin_y",
                    "组件属性路径": "__margin_y",
                    "value": "null"
                },
                {
                    "name": "__margin_right",
                    "ch_name": "右外距",
                    "note": "右外距",
                    "type": "select",
                    "default": "741",
                    "select_list": [
                        [
                            "741",
                            "no"
                        ],
                        [
                            "0",
                            "0px"
                        ],
                        [
                            "1",
                            "4px"
                        ],
                        [
                            "2",
                            "8px"
                        ],
                        [
                            "3",
                            "12px"
                        ],
                        [
                            "4",
                            "16px"
                        ],
                        [
                            "5",
                            "20px"
                        ],
                        [
                            "6",
                            "24px"
                        ],
                        [
                            "7",
                            "28px"
                        ],
                        [
                            "8",
                            "32px"
                        ],
                        [
                            "9",
                            "36px"
                        ],
                        [
                            "10",
                            "40px"
                        ],
                        [
                            "11",
                            "44px"
                        ],
                        [
                            "12",
                            "48px"
                        ]
                    ],
                    "key": "__style.__margin_right",
                    "key2": "__style.__margin_right",
                    "组件属性路径": "__margin_right",
                    "value": "null"
                },
                {
                    "name": "__margin_left",
                    "ch_name": "左外距",
                    "note": "左外距",
                    "type": "select",
                    "default": "741",
                    "select_list": [
                        [
                            "741",
                            "no"
                        ],
                        [
                            "0",
                            "0px"
                        ],
                        [
                            "1",
                            "4px"
                        ],
                        [
                            "2",
                            "8px"
                        ],
                        [
                            "3",
                            "12px"
                        ],
                        [
                            "4",
                            "16px"
                        ],
                        [
                            "5",
                            "20px"
                        ],
                        [
                            "6",
                            "24px"
                        ],
                        [
                            "7",
                            "28px"
                        ],
                        [
                            "8",
                            "32px"
                        ],
                        [
                            "9",
                            "36px"
                        ],
                        [
                            "10",
                            "40px"
                        ],
                        [
                            "11",
                            "44px"
                        ],
                        [
                            "12",
                            "48px"
                        ]
                    ],
                    "key": "__style.__margin_left",
                    "key2": "__style.__margin_left",
                    "组件属性路径": "__margin_left",
                    "value": "null"
                },
                {
                    "name": "__margin_top",
                    "ch_name": "上外距",
                    "note": "上外距",
                    "type": "select",
                    "default": "741",
                    "select_list": [
                        [
                            "741",
                            "no"
                        ],
                        [
                            "0",
                            "0px"
                        ],
                        [
                            "1",
                            "4px"
                        ],
                        [
                            "2",
                            "8px"
                        ],
                        [
                            "3",
                            "12px"
                        ],
                        [
                            "4",
                            "16px"
                        ],
                        [
                            "5",
                            "20px"
                        ],
                        [
                            "6",
                            "24px"
                        ],
                        [
                            "7",
                            "28px"
                        ],
                        [
                            "8",
                            "32px"
                        ],
                        [
                            "9",
                            "36px"
                        ],
                        [
                            "10",
                            "40px"
                        ],
                        [
                            "11",
                            "44px"
                        ],
                        [
                            "12",
                            "48px"
                        ]
                    ],
                    "key": "__style.__margin_top",
                    "key2": "__style.__margin_top",
                    "组件属性路径": "__margin_top",
                    "value": "null"
                },
                {
                    "name": "__margin_bottom",
                    "ch_name": "下外距",
                    "note": "下外距",
                    "type": "select",
                    "default": "741",
                    "select_list": [
                        [
                            "741",
                            "no"
                        ],
                        [
                            "0",
                            "0px"
                        ],
                        [
                            "1",
                            "4px"
                        ],
                        [
                            "2",
                            "8px"
                        ],
                        [
                            "3",
                            "12px"
                        ],
                        [
                            "4",
                            "16px"
                        ],
                        [
                            "5",
                            "20px"
                        ],
                        [
                            "6",
                            "24px"
                        ],
                        [
                            "7",
                            "28px"
                        ],
                        [
                            "8",
                            "32px"
                        ],
                        [
                            "9",
                            "36px"
                        ],
                        [
                            "10",
                            "40px"
                        ],
                        [
                            "11",
                            "44px"
                        ],
                        [
                            "12",
                            "48px"
                        ]
                    ],
                    "key": "__style.__margin_bottom",
                    "key2": "__style.__margin_bottom",
                    "组件属性路径": "__margin_bottom",
                    "value": "null"
                },
                {
                    "name": "__padding",
                    "ch_name": "内距",
                    "note": "内距",
                    "type": "select",
                    "default": "741",
                    "select_list": [
                        [
                            "741",
                            "no"
                        ],
                        [
                            "0",
                            "0px"
                        ],
                        [
                            "1",
                            "4px"
                        ],
                        [
                            "2",
                            "8px"
                        ],
                        [
                            "3",
                            "12px"
                        ],
                        [
                            "4",
                            "16px"
                        ],
                        [
                            "5",
                            "20px"
                        ],
                        [
                            "6",
                            "24px"
                        ],
                        [
                            "7",
                            "28px"
                        ],
                        [
                            "8",
                            "32px"
                        ],
                        [
                            "9",
                            "36px"
                        ],
                        [
                            "10",
                            "40px"
                        ],
                        [
                            "11",
                            "44px"
                        ],
                        [
                            "12",
                            "48px"
                        ]
                    ],
                    "key": "__style.__padding",
                    "key2": "__style.__padding",
                    "组件属性路径": "__padding",
                    "value": "null"
                },
                {
                    "name": "__padding_x",
                    "ch_name": "内距-左右",
                    "note": "内距-左右",
                    "type": "select",
                    "default": "741",
                    "select_list": [
                        [
                            "741",
                            "no"
                        ],
                        [
                            "0",
                            "0px"
                        ],
                        [
                            "1",
                            "4px"
                        ],
                        [
                            "2",
                            "8px"
                        ],
                        [
                            "3",
                            "12px"
                        ],
                        [
                            "4",
                            "16px"
                        ],
                        [
                            "5",
                            "20px"
                        ],
                        [
                            "6",
                            "24px"
                        ],
                        [
                            "7",
                            "28px"
                        ],
                        [
                            "8",
                            "32px"
                        ],
                        [
                            "9",
                            "36px"
                        ],
                        [
                            "10",
                            "40px"
                        ],
                        [
                            "11",
                            "44px"
                        ],
                        [
                            "12",
                            "48px"
                        ]
                    ],
                    "key": "__style.__padding_x",
                    "key2": "__style.__padding_x",
                    "组件属性路径": "__padding_x",
                    "value": "null"
                },
                {
                    "name": "__padding_y",
                    "ch_name": "内距-上下",
                    "note": "内距-上下",
                    "type": "select",
                    "default": "741",
                    "select_list": [
                        [
                            "741",
                            "no"
                        ],
                        [
                            "0",
                            "0px"
                        ],
                        [
                            "1",
                            "4px"
                        ],
                        [
                            "2",
                            "8px"
                        ],
                        [
                            "3",
                            "12px"
                        ],
                        [
                            "4",
                            "16px"
                        ],
                        [
                            "5",
                            "20px"
                        ],
                        [
                            "6",
                            "24px"
                        ],
                        [
                            "7",
                            "28px"
                        ],
                        [
                            "8",
                            "32px"
                        ],
                        [
                            "9",
                            "36px"
                        ],
                        [
                            "10",
                            "40px"
                        ],
                        [
                            "11",
                            "44px"
                        ],
                        [
                            "12",
                            "48px"
                        ]
                    ],
                    "key": "__style.__padding_y",
                    "key2": "__style.__padding_y",
                    "组件属性路径": "__padding_y",
                    "value": "null"
                },
                {
                    "name": "__padding_left",
                    "ch_name": "左内距",
                    "note": "左内距",
                    "type": "select",
                    "default": "741",
                    "select_list": [
                        [
                            "741",
                            "no"
                        ],
                        [
                            "0",
                            "0px"
                        ],
                        [
                            "1",
                            "4px"
                        ],
                        [
                            "2",
                            "8px"
                        ],
                        [
                            "3",
                            "12px"
                        ],
                        [
                            "4",
                            "16px"
                        ],
                        [
                            "5",
                            "20px"
                        ],
                        [
                            "6",
                            "24px"
                        ],
                        [
                            "7",
                            "28px"
                        ],
                        [
                            "8",
                            "32px"
                        ],
                        [
                            "9",
                            "36px"
                        ],
                        [
                            "10",
                            "40px"
                        ],
                        [
                            "11",
                            "44px"
                        ],
                        [
                            "12",
                            "48px"
                        ]
                    ],
                    "key": "__style.__padding_left",
                    "key2": "__style.__padding_left",
                    "组件属性路径": "__padding_left",
                    "value": "null"
                },
                {
                    "name": "__paddint_right",
                    "ch_name": "右内距",
                    "note": "右内距",
                    "type": "select",
                    "default": "741",
                    "select_list": [
                        [
                            "741",
                            "no"
                        ],
                        [
                            "0",
                            "0px"
                        ],
                        [
                            "1",
                            "4px"
                        ],
                        [
                            "2",
                            "8px"
                        ],
                        [
                            "3",
                            "12px"
                        ],
                        [
                            "4",
                            "16px"
                        ],
                        [
                            "5",
                            "20px"
                        ],
                        [
                            "6",
                            "24px"
                        ],
                        [
                            "7",
                            "28px"
                        ],
                        [
                            "8",
                            "32px"
                        ],
                        [
                            "9",
                            "36px"
                        ],
                        [
                            "10",
                            "40px"
                        ],
                        [
                            "11",
                            "44px"
                        ],
                        [
                            "12",
                            "48px"
                        ]
                    ],
                    "key": "__style.__paddint_right",
                    "key2": "__style.__paddint_right",
                    "组件属性路径": "__paddint_right",
                    "value": "null"
                },
                {
                    "name": "__padding_top",
                    "ch_name": "上内距",
                    "note": "上内距",
                    "type": "select",
                    "default": "741",
                    "select_list": [
                        [
                            "741",
                            "no"
                        ],
                        [
                            "0",
                            "0px"
                        ],
                        [
                            "1",
                            "4px"
                        ],
                        [
                            "2",
                            "8px"
                        ],
                        [
                            "3",
                            "12px"
                        ],
                        [
                            "4",
                            "16px"
                        ],
                        [
                            "5",
                            "20px"
                        ],
                        [
                            "6",
                            "24px"
                        ],
                        [
                            "7",
                            "28px"
                        ],
                        [
                            "8",
                            "32px"
                        ],
                        [
                            "9",
                            "36px"
                        ],
                        [
                            "10",
                            "40px"
                        ],
                        [
                            "11",
                            "44px"
                        ],
                        [
                            "12",
                            "48px"
                        ]
                    ],
                    "key": "__style.__padding_top",
                    "key2": "__style.__padding_top",
                    "组件属性路径": "__padding_top",
                    "value": "null"
                },
                {
                    "name": "__padding_bottom",
                    "ch_name": "下内距",
                    "note": "下内距",
                    "type": "select",
                    "default": "741",
                    "select_list": [
                        [
                            "741",
                            "no"
                        ],
                        [
                            "0",
                            "0px"
                        ],
                        [
                            "1",
                            "4px"
                        ],
                        [
                            "2",
                            "8px"
                        ],
                        [
                            "3",
                            "12px"
                        ],
                        [
                            "4",
                            "16px"
                        ],
                        [
                            "5",
                            "20px"
                        ],
                        [
                            "6",
                            "24px"
                        ],
                        [
                            "7",
                            "28px"
                        ],
                        [
                            "8",
                            "32px"
                        ],
                        [
                            "9",
                            "36px"
                        ],
                        [
                            "10",
                            "40px"
                        ],
                        [
                            "11",
                            "44px"
                        ],
                        [
                            "12",
                            "48px"
                        ]
                    ],
                    "key": "__style.__padding_bottom",
                    "key2": "__style.__padding_bottom",
                    "组件属性路径": "__padding_bottom",
                    "value": "null"
                }
            ],
            "key": "__style",
            "default": {
                "__padding_bottom": "741",
                "__padding_top": "741",
                "__paddint_right": "741",
                "__padding_left": "741",
                "__padding_y": "741",
                "__padding_x": "741",
                "__padding": "741",
                "__margin_bottom": "741",
                "__margin_top": "741",
                "__margin_right": "741",
                "__margin_left": "741",
                "__margin_y": "741",
                "__margin_x": "741",
                "__margin": "741",
                "__edit_flag__": false
            },
            "key2": "__style",
            "value": "",
            "close": true
        }
    ],
    "close": false
}
window.a_1_0_4_6_1_解析数据=function(数据,结构数据){
let dict_item={close:true,type:'dict_item',dict:[]}
let res={"type":"dict",dict:[],close:false};
let lst=[{path:'',结构路径:'',data:数据,father_data:res}];
// let count=0;
while(lst.length){
    // count++;
    // console.log("count:",count)
    let item=lst.pop();
    let path=item.path;
    let data=item.data;
    let 结构路径=item.结构路径;
    let father_data=item.father_data;
    //如果是 数组格式
    if (Array.isArray(data)){
        // console.time('数组数据处理耗时');
        let father_dict=father_data.dict;
        let k=null;
        if(item.type=="dict2"){
            for(let i=0;i<data.length;i++){
                k=path+'.'+i;
                father_dict.push({close:true,type:'dict_item',dict:[],name:i,key:k});
                lst.push({path:k,结构路径:结构路径,data:data[i],father_data:father_dict[i],type:"dict2_item"})
            }
        }
        else if(item.type=="dict"){
            for(let i=0;i<data.length;i++){
                k=path+'.'+i;
                father_dict.push({close:true,type:'dict_item',dict:[],name:i,key:k});
                lst.push({path:k,结构路径:结构路径,data:data[i],father_data:father_dict[i]})
            }
        }
        // console.timeEnd('数组数据处理耗时');
    }else{
        // console.time('字典数据处理耗时');
    //字典格式
    for(let key in data){
        let new_path=null;
        if(path==''){new_path=key}
        else{new_path=path+'.'+key;}

        
        let new_结构路径=null;
        if(path==''){new_结构路径=key}
        else{new_结构路径=结构路径+'.'+key;}
        let val=null;
        try{
            val=JSON.parse(JSON.stringify(结构数据[new_结构路径]));
        }catch{
            // console.log("结构数据",结构数据)
            // console.log("new_结构路径",new_结构路径)
            // console.log("item",item)
            // console.log("key",key)
            val=JSON.parse(JSON.stringify(结构数据[key]));
        }
        val.name=key;
        val.key=new_path;
        val.key2=new_path;
        if(item.type=="dict2"){
            // console.log("set_组件属性路径")
            let 结构_lst=结构路径.split(".");
            // console.log("结构lst",结构_lst)
            for (let i=0;i<结构_lst.length-1;i++){
                if(val.组件属性路径){
                    val.组件属性路径=val.组件属性路径+'.'+结构_lst[i];
                }else{
                    val.组件属性路径=结构_lst[i];
                }
            }
            
            if(val.组件属性路径){
                val.组件属性路径=val.组件属性路径+'.'+key;
            }else{
                val.组件属性路径=key;
            }
        }
        // console.log(item)
        // console.log("\t",val)
        father_data.dict.push(val);
        if(val.type=='dict'){
            val.value='';
            val.close=true;
            val.dict=[];
            lst.push({path:new_path,结构路径:new_结构路径,data:data[key],father_data:val,type:"dict"})
        }else if(val.type=='dict2'){
            
            val.value='';
            val.close=true;
            val.dict=[];
            lst.push({path:new_path,结构路径:new_结构路径,data:data[key],father_data:val,type:"dict2"})
        }
        
        else{
            
        val.value=data[key];
        }
    }
    // console.log("data:",data)
    // console.timeEnd('字典数据处理耗时');
    }
}
return res;
}
//  console.log("待解析的数据结构:",a_1_0_4_6_1_解析多层数据结构_测试数据)
//  res1=window.a_1_0_4_6_1_解析多层数据结构(window.a_1_0_4_6_1_解析多层数据结构_测试数据);
//  console.log("解析后的 数据结构:",res1)
//  console.log("待解析的数据:",a_1_0_4_6_1_数据_测试数据)
//  res2=window.a_1_0_4_6_1_解析数据(window.a_1_0_4_6_1_数据_测试数据,res1);
//  console.log("解析后的 数据:",res2)

//修改属性
window.a_1_0_4_6_1_update_val=function(_this){
        let val=_this.data.value;
        
        let change_data={};
        let k_lst=_this.data.key.split(".");
        let key1=null;key2=null;
        if (k_lst.length==1){
            key1="";
            key2=_this.data.key;
        }else{
            key1="."+(k_lst.slice(0, -1)).join('.');
            key2=k_lst[k_lst.length-1];
        }
        change_data[key2]=val;
        update_val={
            "type":"change_data",
            "type2":"更新前端组件属性",
            'page_id':_this.data.father_data.page_id,//页面id
            'temp_id':_this.data.father_data.temp_id,//组件id
            "key":_this.data.key,
            "key1":key1,
            "组件属性路径":_this.data.组件属性路径,
            "key2":key2,
            "value":val,
            'now_select':_this.now_select,
            "path":"page_config.dict.1",
            "data_type":"set_list",//类型 修改数据
            "postput":[
              {
                'path':`page_config.dict.1.dict.${_this.data.father_data.page_id}.dict.1.page_dict.${_this.data.father_data.temp_id}.base_info.data${key1}`,
                'data':change_data
              }],
          }


        let temp_key1=null,temp_key2=null,temp_id2=null;
        //判断是否是属性容器 可以容纳子节点属性的容器
        if(_this.data.key.startsWith("__father_data")){
            let change_data2={'path':'',data:''};
            let change_data={};
            change_data2.data=change_data;
            update_val.postput.push(change_data2);
            let temp_data=_this.data.key.split(".")[1].split("_");
            temp_id2=temp_data[temp_data.length-1];
            let temp_key=_this.data.key.split(".").slice(2).join(".");
            k_lst=temp_key.split(".");
            if (k_lst.length==1){
                temp_key1="";
                temp_key2=temp_key;
            }else{
                temp_key1="."+(k_lst.slice(0, -1)).join('.');
                temp_key2=k_lst[k_lst.length-1];
            }
            change_data[temp_key2]=val;
            change_data2.path=`page_config.dict.1.dict.${_this.data.father_data.page_id}.dict.1.page_dict.${temp_id2}.base_info.data${temp_key1}`;
            //要更新的子容器的属性
            update_val.temp2={
                key1:temp_key1,
                key2:temp_key2,
                temp_id:temp_id2
            }
        }
        _this.data.father_data.全局配置对象.更新(update_val);
    
}
//添加项
window.a_1_0_4_6_1_update_add_item=function(_this){
        /*console.log("开始刷新目录");*/
                // _this.data.刷新目录1();
                let path_before2=`page_config.dict.1.dict.${_this.data.father_data.page_id}.dict.1.page_dict.${_this.data.father_data.temp_id}.base_info.data.${_this.data.key.split(".")[0]}`
                let path_before=`page_config.dict.1.dict.${_this.data.father_data.page_id}.dict.1.page_dict.${_this.data.father_data.temp_id}.base_info.data.${_this.data.key}`
                console.log("添加前端组件属性_新增项path_before",path_before)
                let obj=_this.data.father_data.全局配置对象.update_obj.data;
                window.tt=_this;
                console.log(tt)
                let path_lst=path_before.split(".");
                for(let i=0;i<path_lst.length;i++){
                    obj=obj[path_lst[i]];
                }
                let add_idx=obj.length;
        
                let update_val={
                  "type":"change_data",
                  "type2":"添加前端组件属性_新增项",
                  'page_id':_this.data.father_data.page_id,//页面id
                  'temp_id':_this.data.father_data.temp_id,//组件id
                  "key":_this.data.key,
                  "path_before":path_before2,
                  "path":"page_config.dict.1",
                  "data_type":"set_list",//类型 修改数据
                  "postput":[
                    {
                      'path':path_before+'.'+add_idx,
                      'data':JSON.parse(JSON.stringify(_this.data.default))
                    }],
                }


                
                //判断是否是属性容器 可以容纳子节点属性的容器
                if(_this.data.key.startsWith("__father_data")){
                    let temp_data=_this.data.key.split(".")[1].split("_");
                    let temp_id2=temp_data[temp_data.length-1];
                    let temp_key=_this.data.key.split(".").slice(2).join(".");





                    let path_before2=`page_config.dict.1.dict.${_this.data.father_data.page_id}.dict.1.page_dict.${temp_id2}.base_info.data.${temp_key.split(".")[0]}`;
                    let path_before=`page_config.dict.1.dict.${_this.data.father_data.page_id}.dict.1.page_dict.${temp_id2}.base_info.data.${temp_key}`;
                    //要更新的子容器的属性
                    update_val.temp2={
                        key:temp_key,
                        path_before:path_before2,
                        temp_id:temp_id2
                    }
                    update_val.postput.push({
                        'path':path_before+'.'+add_idx,
                        'data':JSON.parse(JSON.stringify(_this.data.default))});
                }
                _this.data.father_data.全局配置对象.更新(update_val);
}
//删除项
window.a_1_0_4_6_1_update_del_item=function(_this){

    let path_before=`page_config.dict.1.dict.${_this.data.father_data.page_id}.dict.1.page_dict.${_this.data.father_data.temp_id}.base_info.data.${_this.data.key}`
    let update_val={
      "type":"change_data",
      "type2":"添加前端组件属性_删除项",
      'page_id':_this.data.father_data.page_id,//页面id
      'temp_id':_this.data.father_data.temp_id,//组件id
      "key":_this.data.key,
      "path_before":path_before,
      "path":"page_config.dict.1",
      "data_type":"set_list",//类型 修改数据
      "delete":[
        {
          'path':path_before,
        }],
    }
    //判断是否是属性容器 可以容纳子节点属性的容器
    if(_this.data.key.startsWith("__father_data")){
            
        let temp_data=_this.data.key.split(".")[1].split("_");
        let temp_id2=temp_data[temp_data.length-1];
        
        let temp_key=_this.data.key.split(".").slice(2).join(".");
    let path_before=`page_config.dict.1.dict.${_this.data.father_data.page_id}.dict.1.page_dict.${temp_key}.base_info.data.${temp_key}`
            //要更新的子容器的属性
            update_val.temp2={
                key:temp_key,
                path_before:path_before,
                temp_id:temp_id2
            }
            update_val.delete.push({"path":path_before});
    }
    _this.data.father_data.全局配置对象.更新(update_val);  
}


//str 列
Vue.component2('a_1_0_4_6_1_select_line', {
    template: `
        <div :class="{ 'a_1_0_4_6_1_lines test': data.true, 'a_1_0_4_6_1_lines_onclick': data.onclick_flag }" v-show="show_flag">
        <span class="a_1_0_4_6_1_hid_line":style="'padding-left: '+data._space_+'px;'"></span>
        <span  class="icon iconfont icon-str" style="color: #ff7400;"></span>
        
        <span style="color:#bcbcbc">{{data.ch_name}}[{{data.name}}]</span>

        
    <div style="display:inline-block;flex:1;"><div style="display:flex;justify-content: flex-end;display: flex;">
    

    <select v-model="data.value"  class="a_1_0_4_6_1_right a_1_0_4_6_1_input_css" @change="updateProperty">
          <option v-for="item in data.select_list" :value="item[0]" :key="item[0]">
                {{ item[1] }}
            </option>
    </select>


    </div></div>
        </div>
  `,
  data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            ch_name:'',
            _space_:0,
            value:'false',
            value_init:false,
            select_list: [
                ['false','False'],
                ['true','True']
              ]
        }
    }
  },
  methods:{
    updateProperty:function(event){
        a_1_0_4_6_1_update_val(this);
    },
    handle_click:function(event){
        //点击当前 高亮显示
        try{
            console.log("高亮",this.data.path);
            this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        if (this.data.click){
            try{
                this.data.click(event)
                
                // console.log("start click2")
            }
            catch{}
            return 
        }
        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    }
  },
  mounted:function(){
    if(_this.deepcopy_data.value=='false'){
        this.data.value_init=true;
    }
    try{
        _this.data.select_list=JSON.parse(JSON.stringify(_this.data.father_data2.解析后的数据结构[_this.data.key2].select_list));

    }catch{}
    
  }

})
Vue.component2('a_1_0_4_6_1_select_eval_line', {
    template: `
        <div :class="{ 'a_1_0_4_6_1_lines test': data.true, 'a_1_0_4_6_1_lines_onclick': data.onclick_flag }" v-show="show_flag">
        <span class="a_1_0_4_6_1_hid_line":style="'padding-left: '+data._space_+'px;'"></span>
        <span  class="icon iconfont icon-str" style="color: #ff7400;"></span>
        
        <span style="color:#bcbcbc">{{data.ch_name}}[{{data.name}}]</span>

        
    <div style="display:inline-block;flex:1;"><div style="display:flex;justify-content: flex-end;display: flex;">
    

    <select v-model="data.value"  class="a_1_0_4_6_1_right a_1_0_4_6_1_input_css" @change="updateProperty">
          <option v-for="item in data.select_list" :value="item[0]" :key="item[0]">
                {{ item[1] }}
            </option>
    </select>


    </div></div>
        </div>
  `,
  data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            ch_name:'',
            _space_:0,
            value:'false',
            value_init:false,
            select_list: [
                ['false','False'],
                ['true','True']
              ],
            select_list_eval:[0,24,"${i+''}","${0.5+i*0.25}rem"],
        }
    }
  },
  methods:{
    updateProperty:function(event){
        a_1_0_4_6_1_update_val(this);
    },
    handle_click:function(event){
        //点击当前 高亮显示
        try{
            console.log("高亮",this.data.path);
            this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        if (this.data.click){
            try{
                this.data.click(event)
                
                // console.log("start click2")
            }
            catch{}
            return 
        }
        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    replaceEvalExpressions:function(str, context) {
        // 创建一个正则表达式，全局匹配所有的${}表达式
        const regex = /\$\{([^}]+)\}/g;
        // 使用一个函数作为replace方法的第二个参数，以便对每个匹配项进行处理
        return str.replace(regex, (match, expr) => {
            // 如果提供了context对象，则尝试在其中查找变量；否则，使用全局作用域
            const scope = context || window;
            with (scope){return eval(expr)}
        });
    }
  },
  mounted:function(){
    if(_this.deepcopy_data.value=='false'){
        this.data.value_init=true;
    }
    try{
        _this.data.select_list_eval=JSON.parse(JSON.stringify(_this.deepcopy_data.father_data2.解析后的数据结构[_this.deepcopy_data.key2].select_list_eval));
        let select_list=[];
        for(let i=_this.data.select_list_eval[0];i<=_this.data.select_list_eval[1];i++){
            select_list.push([_this.replaceEvalExpressions(_this.data.select_list_eval[2],{i:i}),_this.replaceEvalExpressions(_this.data.select_list_eval[3],{i:i})]);
        }
        _this.$set(_this.data,"select_list",select_list);
    }catch (err){
        // console.log("select_eval_err:",err,"data:",JSON.parse(JSON.stringify(_this.data)))
        // console.log(_this.data.father_data2.解析后的数据结构)

    }
    
  }

})

//str 列
Vue.component2('a_1_0_4_6_1_select_eval_color_line_item', {  
    template: `
<div class="select3_____sub_menu_item" @click="click">
    {{data.text}}<div class="a_1_0_4_6_1_box" :style="{ backgroundColor: data.value }"></div>
</div>
  `,  
  data(){  
  
    return {  
        data:{
            __key__:"1",
            text:"line",
            callback:null,
        }
        
        
    }    
  
  },
    methods: {  
        click(){
            try{
                this.data.callback(this.data.__key__)
            }catch{}
          },
    },  
    
  mounted:function(){
    _this.data.callback=_this.deepcopy_data.callback;
    }
  } 
  );
  
Vue.component2('a_1_0_4_6_1_select_eval_color_line', {
    template: `
        <div :class="{ 'a_1_0_4_6_1_lines test': data.true, 'a_1_0_4_6_1_lines_onclick': data.onclick_flag }" v-show="show_flag">
        <span class="a_1_0_4_6_1_hid_line":style="'padding-left: '+data._space_+'px;'"></span>
        <span  class="icon iconfont icon-str" style="color: #ff7400;"></span>
        
        <span style="color:#bcbcbc">{{data.ch_name}}[{{data.name}}]</span>

        
    <div style="display:inline-block;flex:1;"><div style="display:flex;justify-content: flex-end;display: flex;">
    

    <input   @input="updateProperty($event.target.value)"   type="text" class="a_1_0_4_6_1_right a_1_0_4_6_1_input_css"  v-model="data.value">
    <div class="a_1_0_4_6_1_box" :style="{ backgroundColor: data.value }"></div>
    <div class="a_1_0_4_6_1_color-select" @click="toggleDropdown">
      <span>▼</span>
    </div>







    </div></div>
        </div>
  `,
  data(){
    return{
        dropdownActive: false,
        show_flag:true,
        data:{
            onclick_flag:false,
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            ch_name:'',
            _space_:0,
            value:'false',
            value_init:false,
            select_list: [
                ['false','False'],['true','True']
              ]
        }
    }
  },
  watch:{
  },
  methods:{
    
    replaceEvalExpressions:function(str, context) {
        // 创建一个正则表达式，全局匹配所有的${}表达式
        const regex = /\$\{([^}]+)\}/g;
        // 使用一个函数作为replace方法的第二个参数，以便对每个匹配项进行处理
        return str.replace(regex, (match, expr) => {
            // 如果提供了context对象，则尝试在其中查找变量；否则，使用全局作用域
            const scope = context || window;
            with (scope){return eval(expr)}
        });
    },
    toggleDropdown(event) {
        
        let menu_data=[];
        for(let i=0;i<this.data.select_list.length;i++){
            menu_data.push({text:this.data.select_list[i][1],value:this.data.select_list[i][0]});
        }
  window.select3__({
    event:event,add_xy:{y:0,x:-100},menu_data:menu_data,vue_name:"a_1_0_4_6_1_select_eval_color_line_item",callback:this.selectColor
  })
    },
    selectColor(idx) {
      this.data.value = this.data.select_list[idx][0];
      this.updateProperty();
    },
    updateProperty:function(event){
        a_1_0_4_6_1_update_val(this);
    },
    handle_click:function(event){
        //点击当前 高亮显示
        try{
            console.log("高亮",this.data.path);
            this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        if (this.data.click){
            try{
                this.data.click(event)
                
                // console.log("start click2")
            }
            catch{}
            return 
        }
        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    }
  },
  mounted:function(){
    if(_this.deepcopy_data.value=='false'){
        this.data.value_init=true;
    }
    try{
        _this.data.select_list_eval=JSON.parse(JSON.stringify(_this.deepcopy_data.father_data2.解析后的数据结构[_this.deepcopy_data.key2].select_list_eval));
        let select_list=[];
        for(let i=_this.data.select_list_eval[0];i<=_this.data.select_list_eval[1];i++){
            let val=_this.replaceEvalExpressions(_this.data.select_list_eval[2],{i:i});
            let text=_this.replaceEvalExpressions(_this.data.select_list_eval[3],{i:i});
            // console.log('val,text',val,text)
            select_list.push([val,text]);
        }
        _this.$set(_this.data,"select_list",select_list);
    }catch{}
    
  }

})
Vue.component2('a_1_0_4_6_1_bool_line', {
    template: `
        <div :class="{ 'a_1_0_4_6_1_lines test': data.true, 'a_1_0_4_6_1_lines_onclick': data.onclick_flag }" v-show="show_flag">
        <span class="a_1_0_4_6_1_hid_line":style="'padding-left: '+data._space_+'px;'"></span>
        <span  class="icon iconfont icon-str" style="color: #ff7400;"></span>
        
        <span style="color:#bcbcbc">{{data.ch_name}}[{{data.name}}]</span>

        
    <div style="display:inline-block;flex:1;"><div style="display:flex;justify-content: flex-end;display: flex;">
    

    <select v-model="data.value"  class="a_1_0_4_6_1_right a_1_0_4_6_1_input_css" @change="updateProperty">
        <option value="false">False</option>
        <option value="true">True</option>
    </select>


    </div></div>
        </div>
  `,
  data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            ch_name:'',
            _space_:0,
            value:false,
            value_init:false,
        }
    }
  },
  methods:{
    updateProperty:function(event){
        a_1_0_4_6_1_update_val(this);
    },
    handle_click:function(event){
        //点击当前 高亮显示
        try{
            console.log("高亮",this.data.path);
            this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        if (this.data.click){
            try{
                this.data.click(event)
                
                // console.log("start click2")
            }
            catch{}
            return 
        }
        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    }
  },
  mounted:function(){
    if(_this.deepcopy_data.value==false){
        this.data.value_init=true;
    }
  }

})
//str 列
Vue.component2('a_1_0_4_6_1_str_line', {  
    template: `
        <div :class="{ 'a_1_0_4_6_1_lines test': data.true, 'a_1_0_4_6_1_lines_onclick': data.onclick_flag }" v-show="show_flag">
        <span class="a_1_0_4_6_1_hid_line":style="'padding-left: '+data._space_+'px;'"></span>
        <span  class="icon iconfont icon-str" style="color: #ff7400;"></span>
        
        <span style="color:#bcbcbc">{{data.ch_name}}[{{data.name}}]</span>

        
    <div style="display:inline-block;flex:1;"><div style="display:flex;justify-content: flex-end;display: flex;">
        <input   @input="updateProperty($event.target.value)"   type="text" class="a_1_0_4_6_1_right a_1_0_4_6_1_input_css"  v-model="data.value">
    </div></div>
        </div>
  `,
  data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            ch_name:'',
            _space_:0,
            value:"",
        }
    }
  },
  methods:{
    
    
    updateProperty:function(val){a_1_0_4_6_1_update_val(this);},
    handle_click:function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        if (this.data.click){
            try{
                this.data.click(event)
                
                // console.log("start click2")
            }
            catch{}
            return 
        }
        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    }
  }})
  Vue.component2('a_1_0_4_6_1_list_text_line', {  
    template: `
        <div :class="{ 'a_1_0_4_6_1_lines test': data.true, 'a_1_0_4_6_1_lines_onclick': data.onclick_flag }" v-show="show_flag">
        <span class="a_1_0_4_6_1_hid_line":style="'padding-left: '+data._space_+'px;'"></span>
        <span  class="icon iconfont icon-str" style="color: #ff7400;"></span>
        
        <span style="color:#bcbcbc">{{data.ch_name}}[{{data.name}}]</span>

        
    <div style="display:inline-block;flex:1;"><div style="display:flex;justify-content: flex-end;display: flex;">
        <input   @input="updateProperty($event.target.value)"   type="text" class="a_1_0_4_6_1_right a_1_0_4_6_1_input_css"  v-model="data.value">
    </div></div>
        </div>
  `,
  data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            ch_name:'',
            _space_:0,
            value:"",
        }
    }
  },
  methods:{
    
    
    updateProperty:function(val){a_1_0_4_6_1_update_val(this);},
    handle_click:function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        if (this.data.click){
            try{
                this.data.click(event)
                
                // console.log("start click2")
            }
            catch{}
            return 
        }
        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    }
  }})
  Vue.component2('a_1_0_4_6_1_number_line', {  
    template: `
        <div :class="{ 'a_1_0_4_6_1_lines test': data.true, 'a_1_0_4_6_1_lines_onclick': data.onclick_flag }" v-show="show_flag">
        <span class="a_1_0_4_6_1_hid_line":style="'padding-left: '+data._space_+'px;'"></span>
        <span  class="icon iconfont icon-str" style="color: #ff7400;"></span>
        
        <span style="color:#bcbcbc">{{data.ch_name}}[{{data.name}}]</span>

        
    <div style="display:inline-block;flex:1;"><div style="display:flex;justify-content: flex-end;display: flex;">
        <input   @input="updateProperty($event.target.value)"   type="text" class="a_1_0_4_6_1_right a_1_0_4_6_1_input_css"  v-model="data.value">
    </div></div>
        </div>
  `,
  data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            ch_name:'',
            _space_:0,
            value:"",
        }
    }
  },
  methods:{
    
    updateProperty:function(val){a_1_0_4_6_1_update_val(this);},
    handle_click:function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        if (this.data.click){
            try{
                this.data.click(event)
                
                // console.log("start click2")
            }
            catch{}
            return 
        }
        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    }
  }})
  //str 列
  Vue.component2('a_1_0_4_6_1_dict_item_line', {  
      template: `
<div :class="{ 'a_1_0_4_6_1_lines test': data.true, 'a_1_0_4_6_1_lines_onclick': data.onclick_flag }" class="" @click="handle_click" v-show="show_flag">
    <span class="a_1_0_4_6_1_hid_line":style="'padding-left: '+data._space_+'px;'"></span>
    <span  v-if="data.icon1_show_flag":class="{'icon iconfont':data.true,'icon-right':data.close,'icon-down':data.close==false}"></span>
    <span style="color:#bcbcbc">{{data.name}}</span>
    <div style="display:inline-block;flex:1;"><div style="display:flex;justify-content: flex-end;display: flex;"><div  @click="click1($event,k)" v-for="(v,k) in data.icon_data":key="k">
        <a_1_0_3_0_0 style="display: inline-block;":deepcopy_data="v">
        </a_1_0_3_0_0></div></div>
    </div>

</div>
    `,
    data(){
      return{
          show_flag:true,
          data:{
              onclick_flag:false,
              icon1_show_flag:true,
              click:null,
              click_obj:null,
              true:true,
              false:false,
              close:true,
              name:"",
              _space_:0,
              icon_data:{},
          }
      }
    },
    methods:{
      handle_click:function(event){
          //点击当前 高亮显示
          try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
          if (this.data.click){
              try{
                  this.data.click(event)
                  
                  // console.log("start click2")
              }
              catch{}
              return 
          }
          if (this.data.click_obj){
              try{
                  lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
              
                  // console.log("start click3")
              }
              catch{}
              return 
          }
          try{
              this.data.click_handle(this.data.path,this.data.close);
          }catch{}
      },
      click1:async function(event,k){
        /* console.log(',,,',this.data.icon_data[k].click)*/
         if(!this.data.click_stop){event.stopPropagation();}//阻止父级
         lhp_run_func(this.data.icon_data[k].click);
    
     }
    },
    mounted:function(){
        
    
    _this.data.icon_data={
        1:{
            icon_class:"icon iconfont icon-shanchu",
            hovertext:"删除项",
            add_show:false,
            click:async function(){

                window.a_1_0_4_6_1_update_del_item(_this);




            }
            },
    }
    }


})
  //str 列
  Vue.component2('a_1_0_4_6_1_class_line', {  
      template: `
          <div :class="{ 'a_1_0_4_6_1_lines test': data.true, 'a_1_0_4_6_1_lines_onclick': data.onclick_flag }" v-show="show_flag">
          <span class="a_1_0_4_6_1_hid_line":style="'padding-left: '+data._space_+'px;'"></span>
          <span class="icon iconfont icon-css"  style="color: #42ff42;"></span>
          
          <span style="color:#bcbcbc">{{data.ch_name}}[{{data.name}}]</span>
    <div style="display:inline-block;flex:1;"><div style="display:flex;justify-content: flex-end;display: flex;">
        <input   @input="updateProperty($event.target.value)" type="text" class="a_1_0_4_6_1_right a_1_0_4_6_1_input_css"  v-model="data.value">
    </div></div>
          </div>
    `,
    data(){
      return{
          show_flag:true,
          data:{
              onclick_flag:false,
              icon1_show_flag:true,
              click:null,
              click_obj:null,
              true:true,
              false:false,
              close:true,
              name:"",
              ch_name:'',
              _space_:0,
              value:"",
          }
      }
    },
    methods:{    
    updateProperty:function(val){a_1_0_4_6_1_update_val(this);},
      handle_click:function(event){
          //点击当前 高亮显示
          try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
          if (this.data.click){
              try{
                  this.data.click(event)
                  
                  // console.log("start click2")
              }
              catch{}
              return 
          }
          if (this.data.click_obj){
              try{
                  lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
              
                  // console.log("start click3")
              }
              catch{}
              return 
          }
          try{
              this.data.click_handle(this.data.path,this.data.close);
          }catch{}
      }
    }})
    //str 列
  Vue.component2('a_1_0_4_6_1_url_line', {  
      template: `
          <div :class="{ 'a_1_0_4_6_1_lines test': data.true, 'a_1_0_4_6_1_lines_onclick': data.onclick_flag }" v-show="show_flag">
          <span class="a_1_0_4_6_1_hid_line":style="'padding-left: '+data._space_+'px;'"></span>
          <span class="icon iconfont icon-url" style="color: #cbb800;"></span>
          
          <span style="color:#bcbcbc">{{data.ch_name}}[{{data.name}}]</span>
    <div style="display:inline-block;flex:1;"><div style="display:flex;justify-content: flex-end;display: flex;">
    <input  @input="updateProperty($event.target.value)" type="text" class="a_1_0_4_6_1_right a_1_0_4_6_1_input_css" v-model="data.value">
    </div></div>
          </div>
    `,
    data(){
      return{
          show_flag:true,
          data:{
              onclick_flag:false,
              icon1_show_flag:true,
              click:null,
              click_obj:null,
              true:true,
              false:false,
              close:true,
              name:"",
              ch_name:'',
              _space_:0,
              value:''
          }
      }
    },
    methods:{   
    updateProperty:function(val){a_1_0_4_6_1_update_val(this);},
      handle_click:function(event){
          //点击当前 高亮显示
          try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
          if (this.data.click){
              try{
                  this.data.click(event)
                  
                  // console.log("start click2")
              }
              catch{}
              return 
          }
          if (this.data.click_obj){
              try{
                  lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
              
                  // console.log("start click3")
              }
              catch{}
              return 
          }
          try{
              this.data.click_handle(this.data.path,this.data.close);
          }catch{}
      }
    }})
  
//dict列
Vue.component2('a_1_0_4_6_1_dict_line', {  
  template: `
      <div :class="{ 'a_1_0_4_6_1_lines test': data.true, 'a_1_0_4_6_1_lines_onclick': data.onclick_flag }" class="" @click="handle_click" v-show="show_flag">
      <span class="a_1_0_4_6_1_hid_line":style="'padding-left: '+data._space_+'px;'"></span>
      <span  v-if="data.icon1_show_flag":class="{'icon iconfont':data.true,'icon-right':data.close,'icon-down':data.close==false}"></span>
      
      <span style="color:#bcbcbc">{{data.ch_name}}[{{data.name}}]</span>

      
        <div style="display:inline-block;flex:1;">

        <div style="display:flex;
    justify-content: flex-end;
    display: flex;">
    
        <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
        :key="k">
         <a_1_0_3_0_0 style="display: inline-block;"
         :deepcopy_data="v"></a_1_0_3_0_0>
        </div>

        </div>

        </div>
      </div>
`,
data(){
  return{
      show_flag:true,
      data:{
          onclick_flag:false,
          icon1_show_flag:true,
          click:null,
          click_obj:null,
          true:true,
          false:false,
          close:true,
          name:"",
          ch_name:'',
          _space_:0,
          icon_data:{},
      }
  }
},
methods:{
  handle_click:function(event){
      //点击当前 高亮显示
      try{console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
      if (this.data.click){
          try{
              this.data.click(event)
              
              // console.log("start click2")
          }
          catch{}
          return 
      }
      if (this.data.click_obj){
          try{
              lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
          
              // console.log("start click3")
          }
          catch{}
          return 
      }
      try{
          this.data.click_handle(this.data.path,this.data.close);
      }catch{}
  },
  
  click1:async function(event,k){
    /* console.log(',,,',this.data.icon_data[k].click)*/
     if(!this.data.click_stop){event.stopPropagation();}//阻止父级
     lhp_run_func(this.data.icon_data[k].click);

 }
},


mounted:function(){

    
    _this.data.icon_data={
        1:{
            icon_class:"icon iconfont icon-add",
            hovertext:"添加项",
            add_show:false,
            click:async function(){
        window.a_1_0_4_6_1_update_add_item(_this);



            }
            },
    }
    
}

})

//dict列
Vue.component2('a_1_0_4_6_1_dict2_line', {  
    template: `
        <div :class="{ 'a_1_0_4_6_1_lines test': data.true, 'a_1_0_4_6_1_lines_onclick': data.onclick_flag }" class="" @click="handle_click" v-show="show_flag">
        <span class="a_1_0_4_6_1_hid_line":style="'padding-left: '+data._space_+'px;'"></span>
        <span  v-if="data.icon1_show_flag":class="{'icon iconfont':data.true,'icon-right':data.close,'icon-down':data.close==false}"></span>
        
        <span style="color:#bcbcbc">{{data.ch_name}}[{{data.name}}]</span>
  
        
          <div style="display:inline-block;flex:1;">
  
          <div style="display:flex;
      justify-content: flex-end;
      display: flex;">
      
          <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
          :key="k">
           <a_1_0_3_0_0 style="display: inline-block;"
           :deepcopy_data="v"></a_1_0_3_0_0>
          </div>
  
          </div>
  
          </div>
        </div>
  `,
  data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            ch_name:'',
            _space_:0,
            icon_data:{},
        }
    }
  },
  methods:{
    handle_click:function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
  this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        if (this.data.click){
            try{
                this.data.click(event)
                
                // console.log("start click2")
            }
            catch{}
            return 
        }
        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    
    click1:async function(event,k){
      /* console.log(',,,',this.data.icon_data[k].click)*/
       if(!this.data.click_stop){event.stopPropagation();}//阻止父级
       lhp_run_func(this.data.icon_data[k].click);
  
   }
  },
  
  
  mounted:function(){
      _this.data.icon_data={
      }
      
  }
  
  })
  
  

//计时器
window.a_1_0_4_6_1_timer=null;
//待处理数据列表
window.a_1_0_4_6_1_timer_lst=[];
//计时器运行函数
window.a_1_0_4_6_1_timer_func= async function(){
  while(window.a_1_0_4_6_1_timer_lst.length){
      let new_obj=window.a_1_0_4_6_1_timer_lst.shift();
      let func=new_obj.func;
      if(func.constructor.name === 'AsyncFunction'){
          await func(new_obj.params);
      } else{
          func(new_obj.params);
      }
  }
  window.a_1_0_4_6_1_timer=null;
};
//给计数器运行的函数添加待处理数据  如果计时器没有开启则开启计时器
window.a_1_0_4_6_1_timer_start=function(obj) {  
  window.a_1_0_4_6_1_timer_lst.push(obj);
  if(window.a_1_0_4_6_1_timer==null){

      window.a_1_0_4_6_1_timer = setTimeout(a_1_0_4_6_1_timer_func, 0);    // 设置计时器为开启状态  
  }
}  
Vue.component2('a_1_0_4_6_1_menu2', {  
    template: `
        <div class="a_1_0_4_6_1_menu_bar" :key="refresh"  :style="'width:'+data.width">
            <div class="a_1_0_4_6_1_activity_item" v-for="(menu_id, index) in data.fast_menu" :key="index" @click="selectActivity(menu_id)" :class="{ a_1_0_4_6_1_active: menu_id == selectedActivity }"@mouseover="showSubMenu(menu_id)" @mouseleave="hideSubMenu(menu_id)">
                <span :class="data.menus[menu_id].menu_class"></span>
                <div class="a_1_0_4_6_1_sub_menu" v-if="menu_id==show_menu">
                    <div class="a_1_0_4_6_1_menu_item">
                        {{data.menus[menu_id].menu_name}}
                    </div>
                </div>
            </div>
        </div>
  `,  
  data() {
      return {
        
        show_menu:"-1",
        selectedActivity:'0',
        refresh:"1",/*用来刷新组件*/
        data:{
            width:"100%",
            menu_str:'',
            menus: {
  
        },
        fast_menu:[],//存放menus ids的数组 ids被转为整数 按照sort顺序排列
        show_flag:{}
        }
         
      };
  },
  watch:{
  'data.menu_str':function(e)
  {
    _this.menus=JSON.parse(e);
    _this.refresh_func();//刷新组件
  }},
  methods: {
    showSubMenu(menu_id) {
        if (this.show_menu!=menu_id){
            this.show_menu=menu_id;
            // console.log(this.show_menu)
            this.refresh=this.refresh=="2"?"1":"2";
        }
    },
    hideSubMenu(menu_id) {
        this.show_menu=null;
        this.refresh=this.refresh=="2"?"1":"2";
    },
    selectActivity(id) {
        this.selectedActivity = id;
        try{this.data.menus[this.selectedActivity].func(this.selectedActivity);}
        catch{console.log("点击菜单后出错！")
}
    },
  
  },
  mounted:function(){
    //调用此函数刷新整个组件
    _this.refresh_func=function(){
        //创建菜单目录 快速查找数组
        _this.data.fast_menu=(Object.keys(_this.data.menus).map(Number)).sort();
        _this.refresh=_this.refresh=="2"?"1":"2";
    }
  
    
      //设置选项
      _this.data.set_menu=function(obj){
        /*
        var_name:全局变量 【window[var_name]】
        menu_id:选项id
        menu_name:选项名称
        menu_class:选项类
        menu_keys:选项快捷方式
        */
       let menu_id=obj.menu_id;
       let var_name=obj.var_name;
       let menu_name=obj.menu_name;
       let menu_class=obj.menu_class;
       let menu_keys=obj.menu_keys;
       let func=obj.func;
       //如果已经拥有这个目录 那么仅修改名称
       if (_this.data.menus.hasOwnProperty(menu_id)){
        _this.data.menus[menu_id]['menu_name']=menu_name;
        _this.data.menus[menu_id]['menu_class']=menu_class;
        _this.data.menus[menu_id]['menu_keys']=menu_keys;
        _this.data.menus[menu_id]['func']=func;
       }else{
        //如果没有拥有则新建一个
        _this.data.menus[menu_id]={
            "menu_name":menu_name,
            "menu_keys":menu_keys,
            "var_name":var_name,
            "menu_class":menu_class,
            "func":func,
        }
       }
       _this.refresh_func();//刷新组件
      },
      _this.data.选择=_this.selectActivity;
      //绑定快捷方式对象
      _this.data.bind_fast_obj=function(fast_obj){
        /*快捷方式通过全局 快捷方式对象进行调用*/
      }
  }
  } 
  );
  
Vue.component2('a_1_0_4_6_1_dict', {  
  template: `
      <div class="a_1_0_4_6_1_base" ref="father"v-show="data.show_flag">
      </div>
`,  
data() {
    return {
      show_index:'-1',
      callback:"",
      init_flag:0,
      now_select:"-1",
      refresh:"1",/*用来刷新组件*/
      data:{
          k:{},//数据的格式
          tree_data:{check_dct:{}},//数据会传递给所有子节点的vue对象.data.tree_data中
          show_flag:true,
          data:{},//存储的数据
          data_init:false,
          close:true,
          fast_data:{}, //快速访问dom
          fast_vue_data:{},//快速访问vue
          open_dict:{},//节点展开的状态保存
          open_dict_init:false,//open_dict初始化
          
          解析后的数据结构:null,
          解析后的数据:null,
          deepcopy_data:{},
          data_info:{}
          
      },
    };
},
methods:{
  //添加进时间处理器中 同步进行处理
  add_timer:function(){},
  insertAfter:function(newNode, referenceNode, parentNode) {  
      if(referenceNode==parentNode){
          parentNode.appendChild(newNode);  
          return
      }
      // 将 newNode 插入到 referenceNode 之后  
      if (referenceNode.nextSibling) {  
          // /* console.log("?")*/
          parentNode.insertBefore(newNode, referenceNode.nextSibling);  
      } else {  
          //如果是最后一个子节点 则追加
          let father_child_lst=parentNode.children;
          if (father_child_lst[father_child_lst.length-1]===referenceNode){
              parentNode.appendChild(newNode);
              return
          }
          //否则插入
          // 获取父元素的第一个子节点  
          let firstChild = parentNode.firstChild;  
            
          // 在第一个子节点之前插入新节点  
          if (firstChild) {  
              parentNode.insertBefore(newNode, firstChild);  
              // parentNode.appendChild(newNode);  
          } else {  
              // 如果没有子节点，直接添加新节点  
              parentNode.appendChild(newNode);  
          }
      }  
  },
  handle_click:function(event,flag=null){

    // event.target 是触发点击事件的元素  
    let clickedElement = event.target;  
    if(!flag){event.stopPropagation();}//阻止父级
  }
},
mounted:function(){
  window['dddd']=_this
  window['dddd']=_this
  console.log("_this.deepcopy_data.tree_data.",_this.deepcopy_data,_this.deepcopy_data.tree_data);
  if(!_this.deepcopy_data.tree_data){
      _this.deepcopy_data.tree_data={check_dct:{}};
  }
  _this.deepcopy_data.tree_data.get_father=function(){
      return _this.data
  }
  _this.set_open_dict=function(dict,path){
      let  open_dict= _this.data.open_dict;
      let  copy_dict=_this.data.copy({dict:dict});
      // delete copy_dict.close;
      let path_lst=path.split(".");
      for(let i=0;i<path_lst.length;i++){
          open_dict=open_dict[path_lst[i]];
      }
      let v={};
      for (let k in copy_dict){
          if(open_dict.hasOwnProperty(k)){continue}
          else{
              v[k]=copy_dict[k];
          }
      }
      if(!open_dict.hasOwnProperty('close')){open_dict.close=copy_dict.close}
      open_dict.num=copy_dict.num;
      lhp_deepcopy1(open_dict,v)
  }
  _this.data.get_close=function(path){
      let path_lst=path.split(".");
      let check_open_dct=_this.data.open_dict;
      for(let i=0;i<path_lst.length;i++){
          check_open_dct=check_open_dct[path_lst[i]];
      }
      return check_open_dct.close;
  }
  //获取父节点下上一个子节点的key 没有则返回-In...
  _this.data.get_before=function(father_path,key){
      console.log("father,k",father_path,key)
      let path_lst=father_path.split(".");
      let check_open_dct=_this.data.open_dict;
      for(let i=0;i<path_lst.length;i++){
          check_open_dct=check_open_dct[path_lst[i]];
      }
      let key_v=Number(key);
      let maxIntKey = -Infinity;  
      for (let k in check_open_dct) {  
          if (check_open_dct.hasOwnProperty(k)) {  
              let intKey = Number(k);  
              if (!isNaN(intKey) && intKey < key_v && intKey > maxIntKey) {  
                  maxIntKey = intKey;  
              }  
          }  
      }  
      if (maxIntKey==-Infinity){return -Infinity}
      else{
          return father_path+'.'+maxIntKey;
      }


  }
  //获取到目标节点的最后一个dom
  _this.data.get_last=function(path){
      let path_lst=path.split(".");
      let check_open_dct=_this.data.open_dict;
      for(let i=0;i<path_lst.length;i++){
          check_open_dct=check_open_dct[path_lst[i]];
      }
      let last_path=path;
      while (1){
          if (check_open_dct.close==true){return _this.data.fast_data[last_path]}
          else{
              // 提取并转换所有可以转换为整数的键  
              let intKeys = Object.keys(check_open_dct).filter(key => /^\d+$/.test(key)).map(Number);  
              if(!intKeys.length){return _this.data.fast_data[last_path]}
              let maxIntKey = Math.max(...intKeys);  
              check_open_dct=check_open_dct[maxIntKey];
              last_path=last_path+'.'+maxIntKey;
          }
      }
  }
  _this.data._set_dict=function(obj){
      
      let dict=obj.dict;
     let path=obj.path;
      // console.log("_this.data.get_close(path)",_this.data.get_close(path))
      //加载这部分的this.data.open_dict
      console.log("dict path",dict,path)
      _this.set_open_dict(dict,path);
      //加载这部分内容到this.data.data中
      let path_lst=path.split(".");
      // let last_k=path_lst[path_lst.length-1];
      // let father_path=path.substring(0, path.lastIndexOf('.'));  
      console.log("dict path",dict,path)
      let father_close=_this.data.get_close(path);
      // console.log("_this.data.get_close(path)1",_this.data.get_close(path))
      let set_data=_this.data.data;
      // console.log("_this.data.get_close(path)2",_this.data.get_close(path))
      for(let i=0;i<path_lst.length;i++){
          set_data=set_data['dict'][path_lst[i]];
      }
      // console.log("_this.data.get_close(path)3",_this.data.get_close(path))
      for (let key in dict){
          if(!set_data['dict'][key]){
              // console.log("检测到新增的数据",path+'.'+key)
              set_data['dict'][key]=dict[key]
              // console.log("检测父组件显示状态（显示则为True",!father_close)
              //如果这部分正在显示 那么创建这个dom
              if(!father_close){
                  console.log("dict[key].base_info",dict[key].base_info)
                              let vue_name=dict[key].base_info.vue_name||'a_1_0_4_6_1_lines';//要渲染的vue模板名称
                              //新建一个dom
                              let new_dom=document.createElement(vue_name);
                              //设置dom属性 ref值为ref_obj
                              new_dom.setAttribute('ref', 'ref_obj');
                              let t_deepcopy_data=JSON.parse(JSON.stringify(dict[key].base_info.deepcopy_data));
                              t_deepcopy_data['_space_']=path_lst.length*8;//退格
                              t_deepcopy_data['key']=path+'.'+key;
                              t_deepcopy_data['father_data']=_this.data.father_data;
                              t_deepcopy_data['dict_key']=_this.data.name;
                              t_deepcopy_data['click_handle']=_this.data.click_handle;
                              new_dom.setAttribute(':deepcopy_data',"deepcopy_data");//初始化vue模板的参数
                              new_dom.setAttribute('dom_path',path+'.'+key);//初始化vue模板的参数
                              let vue_dct={'el':new_dom,data:{true:true,false:false,null:null,deepcopy_data:t_deepcopy_data}}
                              let before_path=_this.data.get_before(path,key);
                              console.log("???beforepath",before_path,path,key)
                              if(before_path==-Infinity){
                                  _this.insertAfter(new_dom,_this.data.fast_data[path],_this.$refs.father);
                              }else{
                                  _this.insertAfter(new_dom,_this.data.get_last(before_path),_this.$refs.father);
                              }
                              let new_vue=new Vue(vue_dct);
                              // window.test_vue=new_vue;
                              _this.data.fast_data[path+'.'+key]=new_vue.$el;
                              // next_dom2=new_vue.$el;
                              _this.data.fast_vue_data[path+'.'+key]=new_vue;
              }
          }else{
              // console.log("没有新增数据",path+'.'+key)
              // console.log("检测父组件显示状态（显示则为True",!father_close)
              lhp_deepcopy1(set_data['dict'][key]['base_info'],dict[key]['base_info']);
              //如果这部分正在显示 那么更新这个dom
              if(!father_close){
                  //新建一个dom
                  // new_dom=document.createElement(vue_name);
                  // //设置dom属性 ref值为ref_obj
                  // new_dom.setAttribute('ref', 'ref_obj');
                  // t_deepcopy_data['_space_']=path_lst.length*8;//退格
                  // t_deepcopy_data['path']=path;
                  // t_deepcopy_data['tree_data']=_this.data.tree_data;
                  // t_deepcopy_data['click_handle']=_this.data.click_handle;
                  // new_dom.setAttribute(':deepcopy_data',"deepcopy_data");//初始化vue模板的参数
                  // new_dom.setAttribute('dom_path',path+'.'+key);//初始化vue模板的参数
                  // let vue_dct={'el':new_dom,data:{true:true,false:false,null:null,deepcopy_data:t_deepcopy_data}}
                  // if(key==1){
                  //     _this.insertAfter(new_dom,_this.data.fast_data[path],_this.$refs.father);
                  // }else{
                  //     _this.insertAfter(new_dom,_this.data.fast_data[path+'.'+(Number(key)-1)],_this.$refs.father);
                  // }
                  // new_vue=new Vue(vue_dct);
                  // // window.test_vue=new_vue;
                  // _this.data.fast_data[path+'.'+key]=new_vue.$el;
                  // // next_dom2=new_vue.$el;
                  // _this.data.fast_vue_data[path+'.'+key]=new_vue;
                  
              }
          }
      }

      // console.log("_this.data.get_close(path)4",_this.data.get_close(path))
  }
  _this.data.set_dict=function(dict,path){
      window.a_1_0_4_6_1_timer_start({
          func:_this.data._set_dict,
          params:{
              dict:dict,
              path:path
          }
      })
     
  }
  _this.deepcopy_data.tree_data.set_dict=_this.data.set_dict;
  _this.data.show_index_callback=function(index){
      if(index==_this.show_index){
          _this.data.show_flag=true;
          if(_this.data.data_init==false){
              _this.data.data_init=true;
              // console.log("init!!!")
              _this.data.open("");
          }
      }else{_this.data.show_flag=false}
  }
  _this.data.set_show_index=function(show_index){
      _this.show_index=show_index;
  }
//初始化
_this.init=function(){
  _this.data.open('');
  _this.init_flag=1;
}
_this.data.click_handle=async function(path,close_flag){
  if(close_flag==true){
     await _this.data.open(path);
  }else{
      await _this.data.close(path);
  }
}
//展开
_this.data.set_open=function(__this){
  // console.log("设置为展开",__this)
  __this.$refs.ref_obj.data.close=false;
}
//闭合
_this.data.set_close=function(__this){
  __this.$refs.ref_obj.data.close=true;
}
_this.data.copy=function(copy_data){
  let res={};
  let lst=[[copy_data,res]];
  while (lst.length){
      let item=lst.pop();
      let new_data=item[0];
      let new_res=item[1];
      new_res.close=true;
      if (new_data.dict){
          // console.log("...")
          new_res.num=Object.keys(new_data.dict).length+1;
          for (let key in new_data.dict){
              new_res[key]={};
              new_res2=new_res[key];
              lst.push([
                  new_data.dict[key],
                  new_res2

              ])
          }
      }else{
          new_res.num=1;
      }
  }
  // console.log("end")
  return res
}
_this.sleep=function sleep(ms) {  
  return new Promise(resolve => setTimeout(resolve, ms));  
}  
_this.data.check_variable=function(variable, keyOrIndex) {  
  // 判断是数组还是对象  
  if (Array.isArray(variable)) {  
      // 如果是数组，判断索引是否存在  
      if (variable.hasOwnProperty(keyOrIndex.toString()) && Number.isInteger(Number(keyOrIndex))) {  
          // console.log(`索引 ${keyOrIndex} 存在于数组中`);  
          return 1
      } else {  
          // console.log(`索引 ${keyOrIndex} 不存在于数组中`);  
          return 2
      }  
  } else if (variable && typeof variable === 'object' && !Array.isArray(variable)) {  
      // 如果是对象，判断键是否存在  
      if (variable[keyOrIndex]) {  
          // console.log(`键 "${keyOrIndex}" 存在于对象中`);  
          return 3
      } else {  
          // console.log(`键 "${keyOrIndex}" 不存在于对象中`);  
          return 4
      }  
  } else {  
      // console.log('变量既不是数组也不是对象');  
  }  
}  
_this.data.isPlainObject=function(variable) {  
  return variable !== null &&  
         typeof variable === 'object' &&  
         !Array.isArray(variable) &&  
         Object.getPrototypeOf(variable) === Object.prototype;  
} 
function removeLastDotAndAfter(str) {  
  // 找到最后一个点的索引位置  
  let lastIndex = str.lastIndexOf('.');  
    
  // 如果找到了点，则截取点到字符串开头之间的部分  
  if (lastIndex !== -1) {  
      return str.substring(0, lastIndex);  
  }  
    
  // 如果没有找到点，则返回原始字符串  
  return str;  
}  
function splitByLastDot(str) {  
  // 查找最后一个点的索引位置  
  const lastIndex = str.lastIndexOf('.');  

  // 根据索引位置分割字符串  
  if (lastIndex !== -1) {  
      // 如果有点，返回分割后的两部分  
      return [str.slice(0, lastIndex), str.slice(lastIndex+1)];  
  } else {  
      // 如果没有点，返回原始字符串和一个空字符串  
      return [str, ''];  
  }  
} 
_this.data.get_now_open_dict=function(path){
  
  let now_open_dict=_this.data.open_dict;
  path=removeLastDotAndAfter(path);

  let new_p=path.replace("dict.","").replace("data.","");
  if (new_p.endsWith('.dict')) {  
      new_p=new_p.slice(0, -5);  
  }  
  let new_p_lst=new_p.split(".");
  // console.log("open_dict",JSON.parse(JSON.stringify(_this.data.open_dict)))
  // console.log("new_p_lst",new_p_lst)
  for(let new_p_i=0;new_p_i<new_p_lst.length;new_p_i++){
      now_open_dict=now_open_dict[new_p_lst[new_p_i]];
  }
  return now_open_dict;
}
_this.data.get_now_open_dict2=function(new_p_lst){
  
  let now_open_dict=_this.data.open_dict;
  for(let new_p_i=0;new_p_i<new_p_lst.length-1;new_p_i++){
      now_open_dict=now_open_dict[new_p_lst[new_p_i]];
  }
  return now_open_dict;
}
_this.lhp_set1=function(obj_){
  let data_type=obj_.data_type;//要修改的数据类型  post||put delete clear
  // let _this=obj_._this;//this vue对象
  let path=obj_.path;//path为data_obj要修改的数据的路径
  let data=obj_.data;//data为修改的数据
  console.log("lhp_set1",obj_)
  //类型为新增或者修改
  if (data_type=='postput'){
  let change_obj=_this.data;
  let last_path=null;
  if (path.indexOf(".") !== -1){
      let path_lst=path.split(".");
      for (let i=0;i<path_lst.length-1;i++){change_obj=change_obj[path_lst[i]]}
      last_path=path_lst[path_lst.length-1];
  }else{last_path=path}
  // console.log("change_obj",change_obj)
  // console.log("last_path",last_path)
  if(_this.data.isPlainObject(change_obj)){
      if(change_obj.hasOwnProperty(last_path)){
          lhp_deepcopy1(change_obj[last_path],JSON.parse(JSON.stringify(data)));

      }else{
          change_obj[last_path]=JSON.parse(JSON.stringify(data));
      }
  }else if(isArray(change_obj)){
      if(change_obj[last_path]!=undefined){
          lhp_deepcopy1(change_obj[last_path],JSON.parse(JSON.stringify(data)));
      }else{
          change_obj[last_path]=JSON.parse(JSON.stringify(data));
      }
  }
  // console.log("path",path)
  // console.log("_this.$set(change_obj,last_path,data)",change_obj,last_path,data)
  // lhp_deepcopy1(change_obj,JSON.parse(JSON.stringify(data)));
  //类型为删除
  }else if(data_type=="delete"){
      let change_obj=_this.data.data;
      let father_idx=null;
      let father_obj=null;
      if (path.indexOf(".") !== -1){
          let path_lst=path.split(".");
          if (path_lst.length<=1){console.log("delete异常 数量小于等于1");
return}
          for (let i=0;i<path_lst.length-1;i++){father_obj=change_obj;father_idx=path_lst[i];change_obj=change_obj[path_lst[i]];}
          let last_idx=path_lst[path_lst.length-1];
          // let new_data=JSON.parse(JSON.stringify(change_obj));
          if(typeof change_obj =="object") {  
              if (Array.isArray(change_obj)){
                  change_obj.splice(last_idx,1);

              }else{
                  delete change_obj[last_idx];
              }
      }}else{console.log("delete异常 数量小于2");
return}

      
//类型为清空数据
}else if(data_type=="clear"){
  let change_obj=_this.data;
  let last_key=null;
  if (path.indexOf(".") !== -1){
      let path_lst=path.split(".");
      for (let i=0;i<path_lst.length-1;i++){change_obj=change_obj[path_lst[i]]}
      last_key=path_lst[path_lst.length-1];
  }else{
      last_key=path;
  
  }
  let temp_val=change_obj[last_key]
switch (typeof temp_val) {  
      case 'object':  
          // 注意：这里会匹配到null，因为null也是object类型  
          // 需要额外检查是否为null  
          if (temp_val === null) {  
              change_obj[last_key] = null; // 或者你可以将null也设置为{}  
          } else if (Array.isArray(temp_val)) {  
              change_obj[last_key] = [];  
          } else {  
              change_obj[last_key] = {};  
          }  
          break;  
      case 'string':  
      change_obj[last_key] = '';  
          break;  
      case 'number':  
      change_obj[last_key] = 0;  
          break;  
      case 'boolean':  
      change_obj[last_key] = false;  
          break;  

}


}else if(data_type=='insert'){
  // let before_idx=obj_.before_idx;
  let change_obj=_this.data;
  // let last_path=null;
  // console.log("insert检查-1 obj_",obj_)
  // console.log("insert检查 前data",JSON.parse(JSON.stringify(_this.data.data)))
  if (path.indexOf(".") !== -1){
      let path_lst=path.split(".");
      for (let i=0;i<path_lst.length-1;i++){change_obj=change_obj[path_lst[i]]}
      last_path=path_lst[path_lst.length-1];
  }else{last_path=path}
  change_obj[last_path]=JSON.parse(JSON.stringify(data));
  //类型为删除
  }
}

// 示例数组
// let array = ["123", "abc", "456", "def", "789", "ghi", 0, "0", " "];

// 使用 filter 方法过滤非数字的字符串
let filteredArray = function(array){
  let res=[];
  for(let i=0;i<array.length;i++){
      try{
          let val=Number(array[i])+'';
          if (val!='NaN'){
              res.push(Number(array[i])+'');
          }
      }catch{}
  }
  return res
}
// console.log(filteredArray); // 输出: [123, 456, 789, 0]
//接收协同数据更改后 创建open_dict临时变量 以及打开当前已经显示的数据
_this.data._add_open_dict_and_open=function(obj_){
  // console.log(">>>>????FFFF")
  let data_type=obj_.data_type;//要修改的数据类型  post||put delete clear
  let _this=obj_._this;//this vue对象
  let path=obj_.path;//path为data_obj要修改的数据的路径
  let data=obj_.data;//data为修改的数据
  let path_lst=path.split(".");
  let new_path=filteredArray(path_lst);
  let ddd=new_path.join(".");
  // let last_str=path_lst[path_lst.length-1];
  //类型为新增或者修改
  if (data_type=='postput'){
      _this.lhp_set1(obj_);
      // console.log(">>>>>>????fffff2222",path)
      //检查是否属于添加新的项
      if(path_lst[path_lst.length-2]=='dict'){
          // console.log("pathlsssst",path_lst,new_path)
          let last_idx=new_path[new_path.length-1];
          //生成的open_dict
          let now_open_dict=_this.data.get_now_open_dict2(new_path);
          // console.log("now_open_dicteeeeeeeeee",now_open_dict,last_idx,data,_this.data.copy(data))
          //检查当前树是否拥有此open_dict
          if(!now_open_dict[last_idx]){
              //将生成的open_dict加载到当前树中
              now_open_dict[last_idx]=_this.data.copy(data);
              //检查上层是否是打开状态  如果是打开状态 那么打开当前层
              if(now_open_dict.close!=true){
                  let vue_name=data.base_info.vue_name||'a_1_0_4_6_1_lines';//要渲染的vue模板名称
                  //新建一个dom
                  let new_dom=document.createElement(vue_name);
                  //设置dom属性 ref值为ref_obj
                  new_dom.setAttribute('ref', 'ref_obj');
  // console.log("??key??!2")
                  let t_deepcopy_data=JSON.parse(JSON.stringify(data.base_info.deepcopy_data));
                  t_deepcopy_data['_space_']=(new_path.length-1)*8;//退格
                  t_deepcopy_data['key']=ddd;
                  t_deepcopy_data['tree_data']=_this.data.tree_data;
                  t_deepcopy_data['click_handle']=_this.data.click_handle;
                  new_dom.setAttribute(':deepcopy_data',"deepcopy_data");//初始化vue模板的参数
                  new_dom.setAttribute('dom_path',ddd);//初始化vue模板的参数
                  let vue_dct={'el':new_dom,data:{true:true,false:false,null:null,deepcopy_data:t_deepcopy_data}}
                  let pathxx=splitByLastDot(ddd);
                  let before_path=_this.data.get_before(...pathxx);
  // console.log("??key??!3")
                  // console.log("???beforepath",before_path,path,key)
                  if(before_path==-Infinity){
                      _this.insertAfter(new_dom,_this.data.fast_data[pathxx[0]],_this.$refs.father);
                  }else{
                      _this.insertAfter(new_dom,_this.data.get_last(before_path),_this.$refs.father);
                  }
                  // console.log("??key??!2")
                  let new_vue=new Vue(vue_dct);
                  // window.test_vue=new_vue;
                  _this.data.fast_data[ddd]=new_vue.$el;
                  // next_dom2=new_vue.$el;
                  _this.data.fast_vue_data[ddd]=new_vue;
              }
          }
          return
      }
      //检查是否时更改组件内容
      if(path_lst[path_lst.length-1]=='deepcopy_data'){
              let path_lst2=ddd.split(".");
              let now_set_obj=_this.data.tree_data.全局配置对象.update_obj.data[_this.data['config_name']];
              // let now_set_obj=_this.data.data;
              for(let i=0;i<path_lst2.length;i++){
                  now_set_obj=now_set_obj['dict'][path_lst2[i]];
              }
              try{_this.data.fast_vue_data[ddd].$refs['ref_obj'].init_val()}catch{}
              lhp_deepcopy1(_this.data.fast_vue_data[ddd].$refs['ref_obj'].data,JSON.parse(JSON.stringify(now_set_obj.base_info.deepcopy_data)));
          return
      }


  let change_obj=_this.data;
  let last_path=null;
  if (path.indexOf(".") !== -1){

      for (let i=0;i<path_lst.length-1;i++){change_obj=change_obj[path_lst[i]]}
      last_path=path_lst[(path_lst.length-1)];
  }else{last_path=path}
  // let select=_this.data.check_variable(change_obj,last_path);
  // console.log("检查这条数据 如果数据线内有数据)不存于open_dict那么,_this.data.isPlainObject(change_obj[last_path])",_this.data.isPlainObject(change_obj[last_path]))
  //检查这条数据 如果数据线内有数据)不存于open_dict那么
      if(_this.data.isPlainObject(change_obj[last_path])){
          let dict_flag=false;
         if (change_obj[last_path].hasOwnProperty('dict')){
          dict_flag=true;
          // _this.data._set_dict({
          //     dict:change_obj[last_path].dict,
          //     path:path.replace("data.","").replace("dict.","").replace(".dict","")
          // })
          // console.log("data1")
          let copy_open_dict={};
          if (last_path=='data'){return}
          copy_open_dict[last_path]=_this.data.copy(change_obj[last_path]);
          let now_open_dict=_this.data.get_now_open_dict(path);
          // console.log("now_open_dict",now_open_dict)
          // console.log("copy_open_dict",copy_open_dict)
          lhp_deepcopy1(now_open_dict,copy_open_dict);
          // console.log("startx",now_open_dict.close)
          if(now_open_dict.close==false){
              let ddd=path.replace("data.","").replace("dict.","").replace(".dict","");
              let path_lst=ddd.split(".");
              let now_set_obj=_this.data.data;
              for(let i=0;i<path_lst.length;i++){
                  now_set_obj=now_set_obj['dict'][path_lst[i]];
              }
              console.log()
              //如果没有被显示
              if  (!_this.data.fast_data.hasOwnProperty(ddd)){
                  console.log("没有显示")
                  // console.log("??key??!1")
                                  let vue_name=now_set_obj.base_info.vue_name||'a_1_0_4_6_1_lines';//要渲染的vue模板名称
                                  //新建一个dom
                                  let new_dom=document.createElement(vue_name);
                                  //设置dom属性 ref值为ref_obj
                                  new_dom.setAttribute('ref', 'ref_obj');
                  // console.log("??key??!2")
                                  let t_deepcopy_data=JSON.parse(JSON.stringify(now_set_obj.base_info.deepcopy_data));
                                  t_deepcopy_data['_space_']=(path_lst.length-1)*8;//退格
                                  t_deepcopy_data['path']=ddd;
                                  t_deepcopy_data['tree_data']=_this.data.tree_data;
                                  t_deepcopy_data['click_handle']=_this.data.click_handle;
                                  new_dom.setAttribute(':deepcopy_data',"deepcopy_data");//初始化vue模板的参数
                                  new_dom.setAttribute('dom_path',ddd);//初始化vue模板的参数
                                  let vue_dct={'el':new_dom,data:{true:true,false:false,null:null,deepcopy_data:t_deepcopy_data}}
                                  let pathxx=splitByLastDot(ddd);
                                  let before_path=_this.data.get_before(...pathxx);
                  // console.log("??key??!3")
                                  // console.log("???beforepath",before_path,path,key)
                                  if(before_path==-Infinity){
                                      _this.insertAfter(new_dom,_this.data.fast_data[pathxx[0]],_this.$refs.father);
                                  }else{
                                      _this.insertAfter(new_dom,_this.data.get_last(before_path),_this.$refs.father);
                                  }
                                  // console.log("??key??!2")
                                  let new_vue=new Vue(vue_dct);
                                  // window.test_vue=new_vue;
                                  _this.data.fast_data[ddd]=new_vue.$el;
                                  // next_dom2=new_vue.$el;
                                  _this.data.fast_vue_data[ddd]=new_vue;
                                  // console.log("??key??!3")


              }

                                 
  }


}

      if(dict_flag==false){
          if(last_path=='deepcopy_data'){
              // console.log("开始处理deepcopy数据")
              let ddd=path.replace("data.","").replace("dict.","").replace(".dict","").replace(".base_info.deepcopy_data",'');
              console.log("ddd",ddd)
              let path_lst=ddd.split(".");
              let now_set_obj=_this.data.data;
              for(let i=0;i<path_lst.length;i++){
                  now_set_obj=now_set_obj['dict'][path_lst[i]];
              }
              // console.log("_this.data.fast_vue_data[ddd]",_this.data.fast_vue_data[ddd]);
              // console.log("JSON.parse(JSON.stringify(now_set_obj.base_info.deepcopy_data))",JSON.parse(JSON.stringify(now_set_obj.base_info.deepcopy_data)))
              lhp_deepcopy1(_this.data.fast_vue_data[ddd].$refs['ref_obj'].data,JSON.parse(JSON.stringify(now_set_obj.base_info.deepcopy_data)));
      // ttime3(_this.data.fast_vue_data[path],'ref_obj',,func2_lst=[]);//拷贝数据到vue对象内
          }
      }
      }else{
      }

  //检查这条数据 将本该展开的部分展开

  // //检查这条数据 将已展开的且拥有更新deepcopy_data选项全部更新到节点
  


  // lhp_deepcopy1(change_obj[last_path],JSON.parse(JSON.stringify(data)));
  //类型为删除
  }else if(data_type=="delete"){
      try{
          let ddd=path.replace("data.","").replace("dict.","").replace(".dict","");
          //如果处于展开状态 那么关闭展开
              let change_obj=_this.data;
              let last_path=null;
              if (path.indexOf(".") !== -1){
                  let path_lst=path.split(".");
                  for (let i=0;i<path_lst.length-1;i++){change_obj=change_obj[path_lst[i]]}
                  last_path=path_lst[(path_lst.length-1)];
              }else{last_path=path}
              //检查是否是对象
              if(_this.data.isPlainObject(change_obj[last_path])){
                  let dict_flag=false;
                 if (change_obj[last_path].hasOwnProperty('dict')){
                  dict_flag=true;
                  let now_open_dict=_this.data.get_now_open_dict(path);
                  
                  if(now_open_dict.close==false){
                      _this.data._close(ddd);
          }
          
          
          }
          
          }  
          //如果存在快速访问方式 那么删除快速访问
          if (_this.data.fast_data[ddd]){
              try{
                  console.log("del ddd",ddd)
                  let open_del=_this.data.open_dict;
                  let d_path_lst=ddd.split(".");
                  for (let i9=0;i9<d_path_lst.length-1;i9++){open_del=open_del[d_path_lst[i9]]}
                  delete open_del[d_path_lst[d_path_lst.length-1]];
                  _this.$refs.father.removeChild(_this.data.fast_data[ddd]);
                  delete _this.data.fast_data[ddd];
                  delete _this.data.fast_vue_data[ddd];
              }catch{}
          
          }
          //删除数据
          _this.lhp_set1(obj_);
          
          
      }catch (err){
console.log("err",err)
      }
  
//类型为清空数据
}else if(data_type=="clear"){
  _this.lhp_set1(obj_);
  if(path_lst[path_lst.length-1]=='info'){
      let objxxx=_this.data.fast_vue_data[ddd].$refs['ref_obj'].data.info;

      // console.log("######objxxx######### 111",JSON.parse(JSON.stringify(objxxx)))
      for (let key in objxxx) {
          if (objxxx.hasOwnProperty(key) && key !== 'version') {
          delete objxxx[key];
          }
      }
      // console.log("######objxxx######### 222",JSON.parse(JSON.stringify(objxxx)))
  return
}
  return
  let change_obj=_this.data.data;
  let last_key=null;
  if (path.indexOf(".") !== -1){
      let path_lst=path.split(".");
      for (let i=0;i<path_lst.length-1;i++){change_obj=change_obj[path_lst[i]]}
      last_key=path_lst[path_lst.length-1];
  }else{
      last_key=path;
  
  }
  let temp_val=change_obj[last_key]
switch (typeof temp_val) {  
      case 'object':  
          // 注意：这里会匹配到null，因为null也是object类型  
          // 需要额外检查是否为null  
          if (temp_val === null) {  
              change_obj[last_key] = null; // 或者你可以将null也设置为{}  
          } else if (Array.isArray(temp_val)) {  
              change_obj[last_key] = [];  
          } else {  
              change_obj[last_key] = {};  
          }  
          break;  
      case 'string':  
      change_obj[last_key] = '';  
          break;  
      case 'number':  
      change_obj[last_key] = 0;  
          break;  
      case 'boolean':  
      change_obj[last_key] = false;  
          break;  

}


}else if(data_type=='insert'){
  // let before_idx=obj_.before_idx;
  let change_obj=_this.data.data;
  // let last_path=null;
  // console.log("insert检查-1 obj_",obj_)
  // console.log("insert检查 前data",JSON.parse(JSON.stringify(_this.data.data)))
  if (path.indexOf(".") !== -1){
      let path_lst=path.split(".");
      for (let i=0;i<path_lst.length-1;i++){change_obj=change_obj[path_lst[i]]}
      last_path=path_lst[path_lst.length-1];
  }else{last_path=path}
  change_obj[last_path]=JSON.parse(JSON.stringify(data));
  //类型为删除
  }
}
_this.data.add_open_dict_and_open=function(obj_){
  _this.data._add_open_dict_and_open(obj_);
}
_this.reset_info=function(){
    if(!_this.data.解析后的数据结构){
      console.log("开始解析数据结构:",_this.deepcopy_data.data_info)
      let only_id=_this.deepcopy_data.__only_id;
      let check_md5=md5(JSON.stringify(_this.deepcopy_data.data_info));
      console.time('解析- 结构   耗时:');
       
      if(a_1_0_4_6_1_md5_val[only_id] && a_1_0_4_6_1_md5_val[only_id].md5==check_md5){
          _this.data.解析后的数据结构=a_1_0_4_6_1_md5_val[only_id].data;
      }else{
          _this.data.解析后的数据结构=a_1_0_4_6_1_解析多层数据结构(_this.deepcopy_data.data_info);
      }
      a_1_0_4_6_1_md5_val[only_id]={
          md5:check_md5,
          data:JSON.parse(JSON.stringify(_this.data.解析后的数据结构))
      }
      console.timeEnd('解析- 结构   耗时:');
      console.time('解析- 数据   耗时:');
      _this.data.解析后的数据=a_1_0_4_6_1_解析数据(_this.deepcopy_data.copy_data,_this.data.解析后的数据结构);
      console.timeEnd('解析- 数据   耗时:');
    }

}
//展开目录
_this.data._open=async function(path){
    _this.reset_info();
  //初始化节点的打开信息 以及当前节点的打开数量
  if (_this.data.open_dict_init==false){
      //初始化父节点到快速查找对象中
      _this.data.fast_data[null]=_this.$refs.father;
      _this.data.fast_data['']=_this.$refs.father;
      _this.data.open_dict=_this.data.解析后的数据;//初始化父dom到快速查找字典中
      _this.data.open_dict_init=true;
      // console.log("open_dict",_this.data.open_dict);
  }
  let open_dct=_this.data.open_dict;
  let sort_lst=[];//要排序的列表
  let sort_dct={};
  let father_dom__=_this.$refs.father;
  let father_dom=_this.data.fast_data[path];
  if(path!=''&&path!=null){
      ttime3(_this.data.fast_vue_data[path],'ref_obj',_this.data.set_open,func2_lst=[_this.data.fast_vue_data[path]]);//打开
  }
  // console.log("father_dom__",father_dom__)
  // 创建一个 DocumentFragment  
  // let fragment = document.createDocumentFragment();  
  // console.log("开始展开,展开路径:",path)
  //通过path解析路径
  let obj=_this.data.解析后的数据;
  let path_lst=path.split(".");
  let space=(path_lst.length-1)*8;
  if (path==''){space=-8}
  // console.log("now space:",path_lst,space)
  if (path==''){path_lst=[]}
  for (let i=0;i<path_lst.length;i++){
      obj=obj.dict[path_lst[i]];
      open_dct=open_dct.dict[path_lst[i]];
  
  }
  //打开当前dom
  open_dct.close=false;
  /*console.log("打开当前dom:",path)*/
  let lst=[{
              "path":path,//父节点的路径
              "insert_id":null,//要插入节点的节点id
              fast_obj:obj,//父节点的 的对象
              'space':space,//缩进位数
              'open_num':0,//当前展开层数
              'open_dct':open_dct
          }];
          // console.log("open 3")
  while (lst.length){
      let temp_lst=null;temp_lst_length=null;now_id=null;new_fast_obj=null;new_father_path=null;
      let new_dom=null;new_vue=null;t_deepcopy_data=null;new_fast_obj_base_info=null;vue_name=null;
      let lst_item=lst.pop();
      let new_path=lst_item['path'];//父节点key 用于获取父节点dom
      let fast_obj=lst_item['fast_obj'];//当前节点的dict
      let now_dict=fast_obj.dict;//当前节点下的子节点的dicts
      let insert_id=lst_item['insert_id'];
      let now_open_num=lst_item['open_num'];//当前展开层数
      let now_open_dct=lst_item['open_dct'];
      // console.log("open 4")
      //将当前节点 插入dom中
      if (insert_id==null ){//如果是要展开的节点 那么不创建dom，仅赋值变量
        //   console.log("open 5-1")
          if(path==''){
              //父节点快速查找路径
              new_father_path=null;}
          else{new_father_path=path}
          // console.log("open 5-12")
          new_fast_obj=fast_obj;
      }
      else{
          // console.log("open 5-2")
          new_fast_obj_base_info=new_fast_obj=now_dict[insert_id];
          // console.log("open 5-22")
          if (new_fast_obj_base_info){
            let tttype=new_fast_obj_base_info.type;
            vue_name='a_1_0_4_6_1_'+new_fast_obj_base_info.type+"_line"
              t_deepcopy_data=JSON.parse(JSON.stringify(new_fast_obj_base_info))||{};
            //   console.log("t_deepcopy_data",JSON.parse(JSON.stringify(new_fast_obj_base_info)))
          }else{
              vue_name="a_1_0_4_6_1_str_lines";
              t_deepcopy_data={};
          }
          // console.log("open 5-23")
          //获取当前节点
          if(new_path==null){
              // if (path==null){
              //     new_father_path=insert_id+'';
              // }else{
                  new_father_path=insert_id+'';
              // }
          }else{
              new_father_path=new_path+'.'+insert_id;
          }

          //新建一个dom
          new_dom=document.createElement(vue_name);
          //设置dom属性 ref值为ref_obj
          new_dom.setAttribute('ref', 'ref_obj');
          t_deepcopy_data['_space_']=lst_item.space;//退格
          t_deepcopy_data['path']=new_father_path;
          t_deepcopy_data['father_data']=_this.data.father_data;
          t_deepcopy_data['father_data2']=_this.data;
          
          /*console.log("??????t_deepcopy_data",t_deepcopy_data,_this.data.tree_data)*/
          t_deepcopy_data['click_handle']=_this.data.click_handle;
          new_dom.setAttribute(':deepcopy_data',"deepcopy_data");//初始化vue模板的参数
          new_dom.setAttribute('dom_path',new_father_path);//初始化vue模板的参数

          sort_lst.push(new_father_path);
          sort_dct[new_father_path]={'el':new_dom,data:{true:true,false:false,null:null,deepcopy_data:t_deepcopy_data}}
          //检查当前节点是否处于展开状态 如果未展开 则跳过添加子节点
        //   console.log("//检查当前节点是否处于展开状态 如果未展开 则跳过添加子节点",lst_item,now_open_dct)
          if(now_open_dct.close==false){
              // console.log("flase?:",new_father_path,now_open_dct)
              t_deepcopy_data['close']=false;
          }
      }

      //检查当前节点是否处于展开状态 如果未展开 则跳过添加子节点
      if(now_open_dct.close==true){continue}
      // // if ()
      // //如果当前达到展开上限 则停止展开后续的子节点
      // if (now_open_num>=max_open_type){
      //     continue
      // }else{//设置为展开状态
      //     _this.data.fast_vue_data[new_father_path];
      //     if(new_father_path!=null){
      //         // console.log("_this.data.fast_vue_data[new_father_path],",_this.data.fast_vue_data[new_father_path],_this.data.fast_vue_data)
      //         ttime3(_this.data.fast_vue_data[new_father_path],'ref_obj',_this.data.set_open,func2_lst=[_this.data.fast_vue_data[new_father_path]]);//打开

      //     }
      // }
      // console.log("fast_obj.dict && Object.keys(fast_obj.dict).length",fast_obj.dict && Object.keys(fast_obj.dict).length,fast_obj.dict)

      //遍历子节点 将子节点添加进待处理队列中new_fast_obj
      if (new_fast_obj.dict && Object.keys(new_fast_obj.dict).length){
          // temp_lst=(Object.keys(fast_obj.dict).map(Number)).sort((a,b)=>b-a);
          temp_lst=(Object.keys(new_fast_obj.dict).map(Number)).sort((a,b)=>b-a);
          // console.log("temp_lst",temp_lst)
          temp_lst_length=temp_lst.length;
          if (!temp_lst_length){continue}
      }else{continue}
      //遍历子节点 倒序添加进处理队列
      // for (let i=temp_lst_length-1;i>=0;i--){
      for (let i=0;i<temp_lst_length;i++){
          now_id=temp_lst[i];
          lst.push({
              path:new_father_path,
              insert_id:now_id,
              fast_obj:new_fast_obj,
              space:lst_item.space+8,
              'open_num':now_open_num+1,//当前展开层数
              open_dct:now_open_dct.dict[now_id]
          })
      }
      // console.log("temp_lst加入队列中:",temp_lst,JSON.parse(JSON.stringify(lst)))


  }
  // sort_lst.sort();//排序 ['1.1', '1.1.1', '1.2', '2.1', '2.2']
  let sort_lst2=[];
  // let sort_lst2=sort_lst;
  // console.log("sort_lst",sort_lst)
  while (sort_lst.length){ sort_lst2.push(sort_lst.pop());}
  let count_max=40;count_start=0;
  let fragment = document.createDocumentFragment(); //创建虚拟节点
  let next_dom=father_dom;
  let next_dom2=father_dom;
  // console.log("sort_lst2",father_dom__,next_dom,sort_lst2)
  while (sort_lst2.length){
      //等待页面刷新完成
      if ((count_start++)%count_max==0){
          _this.insertAfter(fragment,next_dom,father_dom__);
          await _this.sleep(16);
          fragment = document.createDocumentFragment(); //创建虚拟节点
          next_dom=next_dom2;
          // console.log("next_dom",next_dom)
          // father_dom__.appendChild(fragment);

      }
      let new_path=sort_lst2.pop();
      let vue_dct=sort_dct[new_path];
      // console.log("newpath",new_path,vue_dct)
      let new_dom=vue_dct.el;
      // _this.insertAfter(new_dom,fragment,fragment);
      fragment.appendChild(new_dom);
              //  father_dom__.appendChild(new_dom);
               
              // _this.insertAfter(new_dom,father_dom,father_dom__);
      let new_vue=new Vue(vue_dct);
      // window.test_vue=new_vue;
      _this.data.fast_data[new_path]=new_vue.$el;
      next_dom2=new_vue.$el;
      _this.data.fast_vue_data[new_path]=new_vue;
  }
  
  _this.insertAfter(fragment,next_dom,father_dom__);
  // console.log("sort_lst",sort_lst);
  // console.log("...",fragment)
}
_this.data.open=async function(path){
  
  window.a_1_0_4_6_1_timer_start({
      func:_this.data._open,
      params:path
  })
}
_this.data.open('');
_this.data._close=async function(path){

  // parent.removeChild(nodeA.nextSibling); // 这里直接删除也可以，但为演示添加到数组后再删除  
  let test_count1=0;
  let open_dct=_this.data.open_dict;
  let sort_lst=[];//要排序的列表
  let sort_dct={};
  let father_dom__=_this.$refs.father;
  let father_dom=_this.data.fast_data[path];
  // console.log("father_dom__",father_dom__)
  // 创建一个 DocumentFragment  
  // let fragment = document.createDocumentFragment();  
  // console.log("开始展开,展开路径:",path)
  //通过path解析路径
  let obj=_this.data.open_dict;
  let path_lst=path.split(".");
  let space=(path_lst.length-1)*8;
  if (path==''){space=-8}
  // console.log("now space:",path_lst,space)
  if (path==''){path_lst=[]}
  for (let i=0;i<path_lst.length;i++){
      obj=obj.dict[path_lst[i]];
      open_dct=open_dct.dict[path_lst[i]];
  
  }
  let lst=[{
              "path":path,//父节点的路径
              "insert_id":null,//要插入节点的节点id
              fast_obj:obj,//父节点的 的对象
              'space':space,//缩进位数
              'open_num':0,//当前展开层数
              'open_dct':open_dct
          }];
    console.log("close 1")
          // console.log("open 3")
  while (lst.length){
      let temp_lst=null;temp_lst_length=null;now_id=null;new_fast_obj=null;new_father_path=null;
      let new_dom=null;new_vue=null;t_deepcopy_data=null;new_fast_obj_base_info=null;vue_name=null;
      let lst_item=lst.pop();
      let new_path=lst_item['path'];//父节点key 用于获取父节点dom
      let fast_obj=lst_item['fast_obj'];//当前节点的dict
      let now_dict=fast_obj.dict;//当前节点下的子节点的dicts
      let insert_id=lst_item['insert_id'];
      let now_open_num=lst_item['open_num'];//当前展开层数
      let now_open_dct=lst_item['open_dct'];
      // console.log(lst_item,new_path,fast_obj,now_dict,insert_id,now_open_num,now_open_dct,'xxx')
      // console.log("open 4")
      //将当前节点 插入dom中
      if (insert_id==null ){//如果是要展开的节点 那么不创建dom，仅赋值变量
          // console.log("open 5-1")
          if(path==''){
              //父节点快速查找路径
              new_father_path=null;}
          else{new_father_path=path}
          // console.log("open 5-12")
          new_fast_obj=fast_obj;
      }
      else{
          // console.log("open 5-2")
          // console.log("new_path",new_path,insert_id)
          // console.log("new_fast_obj",now_dict,insert_id)
          new_fast_obj=now_dict[insert_id];
          // console.log("open 5-23")
          //获取当前节点
          if(new_path==null){
              // if (path==null){
              //     new_father_path=insert_id+'';
              // }else{
                  new_father_path=insert_id+'';
              // }
          }else{
              new_father_path=new_path+'.'+insert_id;
          }

          sort_lst.push(new_father_path);
      }

      //检查当前节点是否处于展开状态 如果未展开 则跳过添加子节点
      // console.log("now_open_dct",now_open_dct)
    //   console.log("new_path",new_path,now_open_dct)
      if(now_open_dct.close==true){continue}
      //遍历子节点 将子节点添加进待处理队列中
      if (new_fast_obj.dict && Object.keys(new_fast_obj.dict).length){
          // temp_lst=(Object.keys(fast_obj.dict).map(Number)).sort((a,b)=>b-a);
          temp_lst=(Object.keys(new_fast_obj.dict).map(Number)).sort((a,b)=>b-a);
          // console.log("temp_lst",temp_lst)
          temp_lst_length=temp_lst.length;
          if (!temp_lst_length){continue}
      }else{continue}
      // console.log("new_father_path add",new_father_path,temp_lst)
      //遍历子节点 倒序添加进处理队列
      // for (let i=temp_lst_length-1;i>=0;i--){
          test_count1=test_count1+temp_lst_length;
        //   console.log(`当前处理数量:${temp_lst_length}/${test_count1}`,temp_lst,new_fast_obj.dict)
      for (let i=0;i<temp_lst_length;i++){
          // console.log("添加入",now_open_dct,now_id,open_dct[now_id])
          now_id=temp_lst[i];
          lst.push({
              path:new_father_path,
              insert_id:now_id,
              fast_obj:new_fast_obj,
              'open_num':now_open_num+1,//当前展开层数
              open_dct:now_open_dct.dict[now_id]
          })
      }
      // console.log("temp_lst加入队列中:",temp_lst,JSON.parse(JSON.stringify(lst)))


  }
  console.log("close 2")
  // console.log("del lst:",JSON.parse(JSON.stringify(sort_lst)))
  let count_max=2330;count_start=0;
  while (sort_lst.length){
      //等待页面刷新完成
      if ((count_start++)%count_max==0){
          await _this.sleep(20);
      }
      let new_path=sort_lst.pop();
      father_dom__.removeChild(_this.data.fast_data[new_path]);
      // array.splice(indexToRemove, 1);  
      delete _this.data.fast_data[new_path];  
      delete _this.data.fast_vue_data[new_path];  
  }
  
  console.log("close 3")
  //关闭当前dom
  open_dct.close=true;
  
  console.log("close 4")
  // console.log("关闭当前dom:")
  // console.log("close !",open_dct)
  if(path!=''&&path!=null){
      ttime3(_this.data.fast_vue_data[path],'ref_obj',_this.data.set_close,func2_lst=[_this.data.fast_vue_data[path]]);//打开
  }
}

_this.data.close=async function(path){
  
  window.a_1_0_4_6_1_timer_start({
      func:_this.data._close,
      params:path
  })

}

}
}
);

Vue.component2('a_1_0_4_6_1_no_edit', {  
    template: `
<div class="a_1_0_4_6_1_no_edit_show_1" v-show="show_flag"><div style="font-weight: bold;">属性转移至属性容器编辑</div></div>
  `,  
  props:{"show_flag":false},

data() {
    return {
    flag: this.show_flag
    };
},
watch: {
    show_flag(newVal) {
    this.flag = newVal;
    }
}
  } 
  );


Vue.component2('a_1_0_4_6_1', {  
  template: `<div style="width:100%;height:100%;
min-width: 300px;" v-show="data.show_flag" :key="refresh">
    <div class="a_1_0_4_6_1_title">
        <div style="color:#bcbcbc">
            前端组件属性编辑框
        </div>
    </div>
    <a_1_0_4_6_1_menu2 ref="menu" :deepcopy_data="deep_menu" :key="refresh_menu">
    </a_1_0_4_6_1_menu2>
    <!-- ------------这里是显示属性内容的--------start--------- -->
    <div v-show="show_0" :key="show_0_key">
        <div class="a_1_0_4_6_1_container" @click="show_all">
        <button type="button" class="a_1_0_4_6_1_button_class">
  全屏编辑模式：{{show_all_flag}}
 </button></div>
        <div class="a_1_0_4_6_1_container" @click="edit_flag_all">
        <button type="button" class="a_1_0_4_6_1_button_class">
  全局辅助开关：{{edit_flag_all_flag}}
</button></div>
    
        <div class="a_1_0_4_6_1_container"><div class="a_1_0_4_6_1_left">
        组件名称【组件id】</div><div class="a_1_0_4_6_1_right">
        {{temp_data.deepcopy_data.name}}【{{data.temp_id}}】</div></div>

        <div class="a_1_0_4_6_1_container"><div class="a_1_0_4_6_1_left">
        组件模板名【版本名】</div><div class="a_1_0_4_6_1_right">
        {{temp_data.name}}【{{temp_data.version_name}}】</div></div>
        
        <div class="a_1_0_4_6_1_container"><div class="a_1_0_4_6_1_left">
        组件模板id</div><div class="a_1_0_4_6_1_right">
        {{temp_data.temp_id}}_{{temp_data.version}}</div></div>


        <div class="a_1_0_4_6_1_container"><div class="a_1_0_4_6_1_left">
        属性移至属性容器【{{temp_data.data2father.name}}=>{{temp_data.data2father.father_id}}】</div><div class="a_1_0_4_6_1_right">
            <select v-model="temp_data.data2father.flag2"  class="a_1_0_4_6_1_right a_1_0_4_6_1_input_css" @change="up_data2father">
                <option value="false">False</option>
                <option value="true">True</option>
            </select>
        </div>
        </div>


        <!-- ------------dict类-------end--------- -->
        <div class="a_1_0_4_6_1_container2" ref="dict">
        </div>
    </div>
    <!-- ------------这里是显示属性内容的-------end--------- -->
    <!-- ------------这里是显示自定义css内容的-------start--------- -->
    <div v-show="show_1" :key="show_1_key">
        <div class="a_1_0_4_6_1_container"><div class="a_1_0_4_6_1_left">
        组件标识[css id]</div><div class="a_1_0_4_6_1_right">
        {{当前项目_当前页面_当前组件_id}}</div></div>
        
        <textarea id="textEditor" class="editor" placeholder="输入自定义数据" style="width: 100%;"></textarea>
        <div class="buttons">
            <button id="restoreButton" class="button disabled">恢复</button>
            <button id="submitButton" class="button disabled">提交</button>
        </div>
    </div>
    <!-- ------------这里是显示自定义css内容的-------end--------- -->
    <!-- ------------这里是显示自定义js内容的-------start--------- -->
    <div v-show="show_2"  :key="show_2_key">
        <div class="a_1_0_4_6_1_container"><div class="a_1_0_4_6_1_left">
        组件标识[css id]</div><div class="a_1_0_4_6_1_right">
        {{当前项目_当前页面_当前组件_id}}</div></div>
        <textarea class="a_1_0_4_6_1_editor" placeholder="输入自定义数据"></textarea>
        <div class="a_1_0_4_6_1_buttons">
            <button id="restoreButton" class="a_1_0_4_6_1_button disabled">恢复</button>
            <button id="submitButton" class="a_1_0_4_6_1_button disabled">提交</button>
        </div>
    </div>
    <!-- ------------这里是显示自定义js内容的-------end--------- -->
    <el-dialog title="提示" :visible.sync="textDialogVisible" width="30%" @close="textDialogVisible = false">
        <!-- 对话框内容 -->
        <span>
            {{ dialogText }}
        </span>
        <span slot="footer" class="dialog-footer">
            <el-button @click="textDialogVisible = false">
                确 定
            </el-button>
        </span>
    </el-dialog>
</div>
`,  
data(){  
  return {  
    show_all_flag:"关闭",//前端可视化界面是否关闭
    edit_flag_all_flag:"开启",//前端辅助功能开启状态
    当前项目_当前页面_当前组件_id:'',
    dict_k:'1',
    textDialogVisible:false,
    dialogText:'',
    color_dct:{
      "固定传参":"#80847e",
      "组件传参":"#55929e",
      "配置设参":"#ab9f64"
    },
    show_1_key:'101',
    refresh_menu:'33',
    deep_menu:'',
    now_show_id:0,
    show_0:true,
    show_0_key:'0',
    show_1:false,
    show_1_key:'3',
    show_2:false,
    show_2_key:'5',
    refresh:'1',
    show_1_data:{
      process_name:'',//所属进程名称
      process_id:'',//所属进程id
      id_:'1',//组件id
      name:'',//组件名称
      temp_name:'',//组件模板名称
      version:'',//组件版本
      version_name:'',//版本名称
    },
    show_2_data:{
      data:[]
    },
    show_3_data:{
      data:[]
    },
    data:{
      temp_id:'null',
      old_md5:'',
      now_select:'',//当前选择的   1_1表示 第一个页面的第一个组件 
      key:'',
      id:'',
      show_flag:false,

      //组件数据格式

      //组件数据



    },
    temp_data:{
      data_info:{},
      deepcopy_data:{
        name:"",//组件名称
      },
      data2father:{"name":" _ ","flag":false,"flag2":false,father_id:""},
      name:"",//组件模板名
      vue_name:"a_1_0_1_1",//组件模板id
      version: 1,//组件模板版本
      version_name:'',//模板版本名称
      temp_id:"",
      
    }//组件数据
  }    

},
watch:{
'data.now_select':function(e){
  console.log("开始选择")
  let _this=this;
  let select_lst=_this.data.now_select.split("_");
  _this.data.page_id=select_lst[0];//页面id
  _this.data.temp_id=select_lst[1];//组件id
  //开始获取当前组件的数据
  _this.all_temp_data=_this.data.全局配置对象.update_obj.data.page_config.dict[1].dict[_this.data.page_id].dict[1].page_dict;
  _this.temp_data=_this.all_temp_data[ _this.data.temp_id].base_info;
  let 项目信息=_this.getQueryParams(); 
  _this.当前项目_当前页面_当前组件_id=`id_${项目信息.项目所有者id}_${项目信息.项目目录id}_${项目信息.项目id}_${_this.data.page_id}_${_this.data.temp_id}`;

  _this.data._刷新dict();
},
'data.show_flag':function(e){
  let _this=this;
  if(!_this.__init__x){
    try{
      _this.$refs.menu.data.set_menu({
        menu_id:0,
        menu_name:'属性',
        menu_class:'icon iconfont icon-shuxing', 
        func:_this.data.show_menu_func   
      })
      
      _this.$refs.menu.data.set_menu({
        menu_id:1,
        menu_name:'css',
        menu_class:'icon iconfont icon-rucan', 
        func:_this.data.show_menu_func       
      })
      
      _this.$refs.menu.data.set_menu({
        menu_id:2,
        menu_name:'js',
        menu_class:'icon iconfont icon-chucan', 
        func:_this.data.show_menu_func     
      })
    }catch{}
    
    _this.__init__x=true;
  }
},
},
methods:{
    show_all:function(){
        let _this=this;
        if(_this.show_all_flag=="开启"){
            _this.show_all_flag="关闭";
            前端可视化编辑界面.退出全屏();
        }else{
            _this.show_all_flag="开启";
            前端可视化编辑界面.设置全屏();
        }
    },
    edit_flag_all:function(){
        let _this=this;
        if(_this.edit_flag_all_flag=="开启"){
            _this.edit_flag_all_flag="关闭";
            前端可视化编辑界面.关全局辅助();
        }else{
            _this.edit_flag_all_flag="开启";
            前端可视化编辑界面.开全局辅助();
        }
    },
    //拥有返回目标id  未拥有返回-1
    check_data_father:function(){
        let _this=this;
        let temp_id=_this.data.temp_id;//获取当前组件的id
        //循环遍历组件id  查找拥有father_data属性的 父容器id
        while ((temp_id+'')!='-1'){
            let check_data=_this.all_temp_data[temp_id];
            temp_id=check_data.base_info.father_id;
            if(temp_id+''=='-1'){break}
            console.log("###",temp_id,_this.all_temp_data)
            if(_this.all_temp_data[temp_id].base_info.father_data){
                break;
            }
        }
        return temp_id
    },
    //设置组件
    up_data2father:function(){
        let _this=this;
        let flag=this.temp_data.data2father.flag2;
        console.log("将组件的属性 设置转移至父容器",flag);
        if(flag=='false'){
            this.no_edit.$refs.ref_obj.flag=false;
            this.temp_data.data2father.flag=false;
            //判断自身是否是false 如果是false则不作多余操作
            if(this.temp_data.data2father.flag==false){return}
            else{
                _this.del_data2father2();
            }   
        }else{
            //判断自身是否是true 如果是则不作多余操作

            if(this.temp_data.data2father.falg==true){return}
            else{
                //首先循环遍历 判断有没有属性容器 组件作为父容器
                let father_id=this.check_data_father();
                if (father_id=='-1'){
                    this.temp_data.data2father.flag2=false;
                    this.temp_data.data2father.flag=false;
                    _this.$message({"type":"error","message":"上层节点不存在属性容器,无法设置"});
                    return
                }
                    _this.$prompt('设置父容器的属性名', '提示', {
                        confirmButtonText: '确定',
                        cancelButtonText: '取消',
                    }).then(({ value }) => {
                        
        try{
            _this.up_data2father2(value,father_id);
        }catch (err){
            console.log("err"+err)
        }
                        
                    }).catch(() => {
                        _this.$message({
                        type: 'info',
                        message: '取消输入'
                        });       
                    });
            }
        }
    },
    del_data2father2:function(){

        let _this=this;
        //获取当前的name
        let now_name=_this.all_temp_data[_this.data.temp_id].base_info.data2father.name;
        let father_id=_this.all_temp_data[_this.data.temp_id].base_info.data2father.father_id;
        let father_data=_this.all_temp_data[father_id];
        let idx1=0,idx2=0;
    let t___=father_data.base_info.data_info;
        for(idx1=0;idx1<t___.length;idx1++){
        if (t___[idx1].name=='__father_data'){
            for (idx2=0;idx2<t___[idx1].dict.length;idx2++){
                if(t___[idx1].dict[idx2].name==now_name){
                    break;
                }
            }
            break;
        
        }
        }
        let temp_data={};
        //当前节点数据
        temp_data[_this.data.temp_id]={base_info:{data2father:{flag:false,flag2:false,name:"",father_id:""}}};
        let update_val={
          "type":"change_data",
          "type2":"取消_前端属性移至属性容器",
          'page_id':_this.data.page_id,
          'temp_id':_this.data.temp_id,
          "father_id":father_id,
          'now_select':_this.now_select,
          "path":"page_config.dict.1",
          "data_type":"set_list",//类型 修改数据
          "postput":[
            {
              'path':`page_config.dict.1.dict.${_this.data.page_id}.dict.1.page_dict`,
              'data':temp_data
            },
        
        ],
        "delete":[
            {"path":`page_config.dict.1.dict.${_this.data.page_id}.dict.1.page_dict.${father_id}.base_info.data_info.${idx1}.dict.${idx2}`},
            {"path":`page_config.dict.1.dict.${_this.data.page_id}.dict.1.page_dict.${father_id}.base_info.data.__father_data.${now_name}`},
        ]
        }
        this.temp_data.data2father.falg2=false;
        _this.data.全局配置对象.更新(update_val); 
    },
    up_data2father2:function(name,father_id){
        let _this=this;
        let new_name= name+"_"+_this.data.temp_id;
        let create_data={};
        create_data[new_name]=JSON.parse(JSON.stringify(_this.temp_data.data));
        let create_data_info_len=0,idx=0;
        let father_data=_this.all_temp_data[father_id];
    let t___=father_data.base_info.data_info;
        for(idx=0;idx<t___.length;idx++){
        if (t___[idx].name=='__father_data'){create_data_info_len=t___[idx].dict.length;break;}
        }
        let create_data_info={
            name: new_name,//组件id
            ch_name: "",
            note: "",
            type: "dict2",
            dict:JSON.parse(JSON.stringify(_this.temp_data.data_info))
          };
        let temp_data={};
        //当前节点数据
        temp_data[_this.data.temp_id]={base_info:{data2father:{flag:true,flag2:true,name:new_name,father_id:father_id}}};
        //父组件数据
        temp_data[father_id]={
            base_info:{
                data:{__father_data:create_data},
            }
        }
        let update_val={
          "type":"change_data",
          "type2":"前端属性移至属性容器",
          'page_id':_this.data.page_id,
          'temp_id':_this.data.temp_id,
          "father_id":father_id,
          'now_select':_this.now_select,
          "path":"page_config.dict.1",
          "data_type":"set_list",//类型 修改数据
          "postput":[
            {
              'path':`page_config.dict.1.dict.${_this.data.page_id}.dict.1.page_dict`,
              'data':temp_data
            },
            {
              'path':`page_config.dict.1.dict.${_this.data.page_id}.dict.1.page_dict.${father_id}.base_info.data_info.${idx}.dict.${create_data_info_len}`,
              'data':create_data_info
            },
        
        ],
        }
        this.temp_data.data2father.falg2=false;
        _this.data.全局配置对象.更新(update_val); 
    },
  updateProperty:function(name,value){
    let _this=this;
    console.log("修改属性",name,value);
    let change_data={};
    change_data[name]=value;

    let update_val={
      "type":"change_data",
      "type2":"更新前端组件属性",
      'page_id':_this.data.page_id,
      'temp_id':_this.data.temp_id,
      "name":name,
      "value":value,
      'now_select':_this.now_select,
      "path":"page_config.dict.1",
      "data_type":"set_list",//类型 修改数据
      "postput":[
        {
          'path':`page_config.dict.1.dict.${_this.data.page_id}.dict.1.page_dict.${_this.data.temp_id}.base_info.deepcopy_data`,
          'data':change_data
        }],
    }
    _this.data.全局配置对象.更新(update_val);
  }
},

mounted:function(){
    _this.getQueryParams=function() {  
        if(!_this.data.项目信息){
            const queryParams = {};  
            const urlParams = new URLSearchParams(window.location.search);  
            for (const [key, value] of urlParams.entries()) {  
                queryParams[key] = value;  
            }  
            let 项目所有者id=queryParams.user_id;
            let 项目目录id=queryParams.project_dir;
            let 项目id=queryParams.project_id; 
            _this.data.项目信息={项目所有者id,项目目录id,项目id}; 
        }

            return _this.data.项目信息
    }  

  _this.data.show_menu_func=function(menu_id){
    if(_this.now_show_id==menu_id){return}
    else{
      //显示数据
      _this['show_'+_this.now_show_id]=false;
      _this.now_show_id=menu_id;
      _this['show_'+_this.now_show_id]=true;
      //刷新数据
      let v1=(_this.now_show_id*2)+'',v2=(_this.now_show_id*2+1)+'';
      let show_k='show_'+_this.now_show_id+'_key';
      _this[show_k]==_this[show_k]==v1?v2:v1;
    }
  }
    _this.data._刷新dict=function(){
        
        _this.$refs.dict.innerHTML=''
  let vue_name='a_1_0_4_6_1_dict';//要渲染的vue模板名称
  let new_dom=document.createElement(vue_name);
  new_dom.setAttribute('ref', 'ref_obj');
  let t_deepcopy_data={'copy_data':_this.temp_data.data,'data_info':_this.temp_data.data_info,'__only_id':_this.当前项目_当前页面_当前组件_id,'father_data':_this.data};
  new_dom.setAttribute(':deepcopy_data',"deepcopy_data");//初始化vue模板的参数
  let vue_dct={'el':new_dom,data:{true:true,false:false,null:null,deepcopy_data:t_deepcopy_data}}
  _this.$refs.dict.appendChild(new_dom);
  _this.old_dict_vue=new Vue(vue_dct);


  vue_name='a_1_0_4_6_1_no_edit';//要渲染的vue模板名称
  new_dom=document.createElement(vue_name);
  new_dom.setAttribute('ref', 'ref_obj');
  new_dom.setAttribute(':show_flag', 'show_flag');
  vue_dct={'el':new_dom,data:{"show_flag":_this.temp_data.data2father.flag}}
  _this.$refs.dict.appendChild(new_dom);
  _this.no_edit=new Vue(vue_dct);

    }
_this.data.协同数据处理=function(obj){
  if(obj.type2=='更新前端组件属性'){
    if (obj.page_id==_this.data.page_id && obj.temp_id==_this.data.temp_id){
      if(_this.temp_data[obj.name]!=JSON.parse(JSON.stringify(obj.value))){
        _this.temp_data[obj.name]=JSON.parse(JSON.stringify(obj.value));
      }
    }else if(obj.temp2){
        if (obj.page_id==_this.data.page_id && obj.temp2.temp_id==_this.data.temp_id){
            if(_this.temp_data[obj.temp2.name]!=JSON.parse(JSON.stringify(obj.value))){
            _this.temp_data[obj.temp2.name]=JSON.parse(JSON.stringify(obj.value));
            }
        }
    }
    // _this.show_0_key=_this.show_0_key=='1'?'0':'1';
  }else if(obj.type2=="添加前端组件属性_删除项"){
    if (obj.page_id==_this.data.page_id && obj.temp_id==_this.data.temp_id){
    _this.data._刷新dict();
    }
  }else if(obj.type2=="添加前端组件属性_新增项"){
    if (obj.page_id==_this.data.page_id && obj.temp_id==_this.data.temp_id){
    _this.data._刷新dict();
    }

  }else if(obj.type2=="前端属性移至属性容器"){
    console.log("前端属性移至属性容器1")
    if (obj.page_id==_this.data.page_id && ((obj.temp_id==_this.data.temp_id) || (_this.data.temp_id==obj.father_id))){
    _this.data._刷新dict();
    console.log("前端属性移至属性容器2")
    }
  }else if(obj.type2=="取消_前端属性移至属性容器"){
    console.log("取消_前端属性移至属性容器")
    if (obj.page_id==_this.data.page_id && ((obj.temp_id==_this.data.temp_id) || (_this.data.temp_id==obj.father_id))){
    _this.data._刷新dict();
    console.log("取消_前端属性移至属性容器")
    }
  }
}

},
}
);

